The authentication route is responsible for validating user credentials and providing an access token to enable secure usage of the application's services. With this route, it is possible to authenticate in the microservice, obtain the access token, and start consuming the other routes.
How to get the credentials?
Contact the CDC team to get a credential made, you will be supplied with unique a
client_keyandclient_secretfor testing, after approval of the registration.
Using the authentication token
The authentication token expires after 60 minutes. Each token is of type Bearer. To authenticate your API requests, include the token in the Authorization header as follows:
Authorization: Bearer {YourToken}Replace
{YourToken}with the actual token value (excluding the curly braces).
Response
| Http Code | Return Code | Message |
|---|---|---|
| 200 | 200-01 | Success. |
| 400 | 400-01 | Something unexpected happened. |
| 401 | 401-03 | incorrect client_key or client_secret |
| 401 | 401-04 | incorrect client_key or client_secret |
Response Parameters
| Parameters | Format | Description |
|---|---|---|
| request_code | String | Unique identifier for the request |
| return | Boolean | Indicates if the request was successful or not |
| return_code | String | Code representing the status of the request |
| message | String | Message describing the result of the request |
| token | String | Access token generated for authentication |
| token_type | String | Type of token (usually "bearer") |
| expires_in | Integer | Token validity period in seconds |