Oauth API
The Oauth API allows you to generate a token to be used later by the different APIs available.
REQUEST
Path
Method: POST
Environment | URL |
|---|---|
Pre-Production | https://auth.wip.alignet.io/token |
Headers
For all payment methods, the following parameters will be sent in the request header:
Field | Description | Accepted Value | Type | Mandatory |
|---|---|---|---|---|
| API version to use | Alfanumeric |
| NO |
Body
Field | Description | Accepted Value | Type | Mandatory |
|---|---|---|---|---|
| Action to be taken |
|
| YES |
| Authorization method |
|
| YES |
| Base URL of the API to be used found in API Orchestrator |
|
| YES |
| Client ID |
| YES | |
| Client Secret |
| YES | |
| Permits to apply for | create:token
|
| YES |
{
"action": "authorize",
"grant_type": "client_credentials",
"audience": "https://paymentapi.preprod.alignet.io",
"client_id": "WDqE4tFbhvzm5XJnnTYcPUNQGQMTg8P4",
"client_secret": "rzBZjHn0lWb0xMPzqOiBAuznzlAq23LfsFEr2p4Rw7ezWzosxpt1Z1mpp8dt8zlR",
"scope": "create:token post:charges get:charges delete:charges"
}
RESPONSE
Field | Description | Accepted Value | Type | Mandatory |
|---|---|---|---|---|
| Action to be taken |
|
| YES |
| Indicates whether the process was successful | Alfanumeric:
|
| YES |
| Token to use in APIs | Alfanumeric |
| YES |
| Permits to apply for | create:token
|
| YES |
| Token expiration time in seconds | Numeric |
| YES |
| Token type |
| YES | |
| Object containing metadata of the executed flow |
|
| YES |
| Object containing metadata of the executed flow |
|
| YES |
| Object containing the result of the executed flow |
|
| YES |
| Code representing the result of the executed flow | Numeric |
| YES |
| Object that contains the message resulting from the flow. |
|
| YES |
| Language level locality for the message of the executed flow. | Alfanumeric |
| YES |
| Message resulting from the executed flow | Alfanumeric |
| YES |
Ejemplo
{
"action": "authorize",
"success": true,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczovL2F1dGguYWxpZ25ldC5pbyIsInN1YiI6ImJDWG5TOHRqVWpiaTdKWTRVQW1scDVBakg4OEVDTlZOIiwiYXVkIjoiaHR0cHM6Ly84ZWZ0Z3BoOWthLmV4ZWN1dGUtYXBpLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tIiwiaWF0IjoxNzA2ODE1NzkzLCJleHAiOjE3MDY4MjQzOTMsImF6cCI6ImJDWG5TOHRqVWpiaTdKWTRVQW1scDVBakg4OEVDTlZOIiwic2NvcGUiOiJjcmVhdGU6dG9rZW4gYXBpLXRlc3Q6Y3JlYXRlOnRva2VuIiwiZ3R5IjoiY2xpZW50X2NyZWRlbnRpYWxzIn0.pruy3-6luVULktqox86kg7ibQKk0SpZgxR1re8e94rjXT-h1jlpa9xJLnmhorjY8786q26k8WsSyDLlOAuM1ZmRjBTwV7Gdq5RktfQD0fZLLKSyUcsNvF9_SmduBsi3hkHxSjfy70ERtFr9BYUTic7Z7d6anL67AxpC9G6sAQ3xilzpQXV82eUc2aagXhZo8zQjI-hEOG4Be7Vm9G5_NX5pb8MU7IRZcZ7mOan_EG4fSDD0wwZbxIipYabLEZIMH-r9ghrWoHMJGklphR26n1sTgRro0qHZj-CHcgSLZFiPa-s3BwQjC9qJSj9rbi-i8o6g3PlivI6XEh2-M5T7xI7xiU_4Di91l_SvY5uca5J1YwNZJ3D18pgCyZXXjb704ICreFYRvBdd36rHumDhFVW5iXva0yQmpHsP3VtS0ABCzDaMAalVXW7fQv-Mf3epbJptglTsNVlV9HSnP_kFRJ1T3DDdyPV0pR61JlC_08ouN9VKvS0sfHfEnSJL9jwhugHSRgm5owN5kOY0xxifffoeivLVzMGuhq5iPWMVjGT7Yg4fCJuXOFoSw4Dk9xVVGlj6xrw3azPvve4JzEqN_Tz3hph5X9a5O4hCYvdqYukzFm8EPJ4Q9oGrASKLU2IccjLBpKVWbAi0Hws5zH7ZFMGLmTWDUW92RSxz4kAElauY",
"scope": "create:token api-test:create:token",
"expires_in": 8600,
"token_type": "Bearer",
"authorization": {
"meta": {
"status": {
"code": "00",
"message_ilgn": [
{
"locale": "es_PE",
"value": "Access Token creado"
}
]
}
}
}
}