Skip to main content
Skip table of contents

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

ALG-API-VERSION

API version to use

Alfanumeric

String

NO

Body

Field

Description

Accepted Value

Type

Mandatory

action

Action to be taken

  • authorize

String

YES

grant_type

Authorization method

  • client_credentials

String

YES

audience

Base URL of the API to be used found in API Orchestrator

{{base}}

String

YES

client_id

Client ID

String

YES

client_secret

Client Secret

String

YES

scope

Permits to apply for

create:token

  • post:charges

  • get:charges

  • delete:charges

String

YES

JSON
{
    "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

Action to be taken

  • authorize

String

YES

success

Indicates whether the process was successful

Alfanumeric:

  • true

  • false

String

YES

access_token

Token to use in APIs

Alfanumeric

String

YES

scope

Permits to apply for

create:token

  • post:charges

  • get:charges

  • delete:charges

String

YES

expires_in

Token expiration time in seconds

Numeric

String

YES

token_type

Token type

  • Bearer

YES

authorization

Object containing metadata of the executed flow

 

Object

YES

authorization.meta

Object containing metadata of the executed flow

 

Object

YES

authorization.meta.status

Object containing the result of the executed flow

 

Object

YES

authorization.meta.status.code

Code representing the result of the executed flow

Numeric

String

YES

authorization.meta.status.message_ilgn

Object that contains the message resulting from the flow.

 

Object

YES

authorization.meta.status.message_ilgn.[].locale

Language level locality for the message of the executed flow.

Alfanumeric

String

YES

authorization.meta.status.message_ilgn.[].value

Message resulting from the executed flow

Alfanumeric

String

YES

Ejemplo

JSON
{
    "action": "authorize",
    "success": true,
    "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hws5zH7ZFMGLmTWDUW92RSxz4kAElauY",
    "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"
                    }
                ]
            }
        }
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.