Authentication
POST
/api/v1/auth-service/auth/login
This endpoint is used for login. It authenticates a partner using a username and password, and returns an access_token (Bearer) that must be included in the Authorization header of all subsequent Flight API requests.
- cURL
- Request
- Response
- Request Details
- Response Details
curl --location 'https://api.etscore.com/api/v1/auth-service/auth/login' \
--header 'Accept-Language: en-US' \
--header 'Content-Type: application/json' \
--data '{
"username": "etscore.royalapi",
"password": "*****"
}'
{
"username": "etscore.royalapi",
"password": "*****"
}
{
"access_token": "eyJhbGciOiJSUzI1Ni...",
"expires_in": 43200,
"refresh_expires_in": 108000,
"refresh_token": "eyJhbGciOiJSUzI1Ni...",
"token_type": "bearer"
}
| Name | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | The 'username' created and sent for your company by Etscore. |
| password | string | Yes | The 'password' created and sent for your company by Etscore. |
| Name | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | The authentication token used for authorization (in JWT format). Send as Bearer <access_token>. |
| expires_in | int | Yes | The number of seconds until the access token expires. (43200 = 12 hours) |
| refresh_expires_in | int | Yes | The number of seconds until the refresh token expires. (108000 = 30 hours) |
| refresh_token | string | Yes | The token used to obtain a new access token. |
| token_type | string | Yes | The type of token (typically "bearer"). |