Endpoint
Method: POST
Type: RAW
URL: {{API_BASE_URL}}/auth/access-token
In order to make requests against Data API, client needs to perform authentication. We use Bearer Tokens method of authentication (https://oauth.net/2/bearer-tokens/). In order to obtain auth token,client submits credentials to /auth/access-token endpoint.
Credentials are provided by Adpos Pay as part of Data API signup process.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Y | E-mail address | |
| password | string | Y | password |
{
"email": "admin@adpos.com",
"password": "123456"
}
Response
| Field | Type | Description |
|---|---|---|
| data | object | data Object |
| access_token | string | Access token string |
| token_type | string | Token type |
| expires_in | integer | Token validity duration in seconds (86400 = 24 hours) |
Status: 200
Status: 401 (Unauthorized)
{
"data": {
"access_token": "this is a access token string",
"token_type": "Bearer",
"expires_in": 86400
}
}
Note: The access token expires after 24 hours. You need to call this endpoint again to obtain a new token before the current one expires. We recommend refreshing the token proactively (e.g., every 23 hours) to avoid request failures.