Authentication
post
/api/v1/auth-service/auth/login
This endpoint is used for login.
- cURL
- Request
- Response
- Request Details
- Response Details
- Errors
curl --location 'https://test-api.etscore.com/api/v1/auth-service/auth/login' \
--header 'Accept-Language: en-US' \
--header 'Content-Type: application/json' \
--data '{
"username": "test.etscore.*****",
"password": "******"
}'
{
"username": "test.etscore.*****",
"password": "*****"
}
{
"access_token": "eyJhbGciOiqJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlZndiWWQ3aTg2bFB1TDdoZHItTWhQRHNWa0UybHRjR3hUUG0zbGFudlVnIn0.eyJqdGkiOiJjN2I2YjFmMy1iYWM3LTQxZjUtYjYxZS0zYjNhZTVjY2M2NzIiLCJleHAiOjE3NDIyMTkyMTEsIm5iZiI6MCwiaWF0IjoxNzQyMjAxMjExLCJpc3MiOiJodHRwczovL29wZW5pZC5ldHN0dXIuY29tL2F1dGgvcmVhbG1zL2V0c2NvcmUiLCJhdWQiOiJ0ZXN0X2NsaSIsInN1YiI6Ijk5MjdiOGViLThiN2UtNDM2OS1iYzlhLWNkZTFhNDM1ZjhjOCIsInR5cCI6IkJlYXJlciIsImF6cCI6InRlc3RfY2xpIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiZWVhYTExZTgtYWM2My00OTJiLTk5NWUtZWIwYTVkZDJhM2I2IiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6W10sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIExEQVBfSUQgc2FsZXNfY2hhbm5lbF9lbWFpbF9hZGRyZXNzIHNhbGVzY2hhb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XN0X2NsaSIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6ImVlYWExMWU4LWFjNjMtNDkyYi05OTVlLWViMGE1ZGQyYTNiNiIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIExEQVBfSUQgc2FsZXNfY2hhbm5lbF9lbWFpbF9hZGRyZXNzIHNhbGVzY2hhbm5lbG5hbWUifQ.NFgebcx5IELIFOxZpduX3Nf5WtYmlN0qYpRE_5_Uk9HalYXc-9z7mzjlh2AdE-NEr7_OYAF4qLR1zrZ0ve20JPPKBxZHpe_6xnplZvd9zyfdDIg9sEVZphknzU_ZAZvAYwL0yJ73bp-ULeDmzaNmOLbfLOBpWUAeK3D5pKPHPj01VPh6fcjCaXQDec64AVxcqzhs--OH558u_YcHZBOC9DohCD0YtUL86ktdVS_cMYFIoJN3NmZcX6LKL02Rna0O399KTbU6PqPKQ4AXejrRUOtdwoCliWwSrSwJ9BtDjZexL-rHhRc_eXrKXQvD4JNOcIa1c_0XJ7lX90IC5e6ogw",
"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). |
| expires_in | string | Yes | The number of seconds until the access token expires. (18000=5 hour) |
| refresh_expires_in | string | Yes | The number of seconds until the refresh token expires. (18000=5 hour) |
| refresh_token | string | Yes | The token used to obtain a new access token. |
| token_type | string | Yes | The type of token (typically "bearer"). |
Errors specific to this endpoint (13 codes). Gateway and authentication errors apply to every endpoint and are listed in the Error Codes reference.
AuthThe bearer token is missing, invalid or expired, or the account is not authorized for the operation.
| Group | Code | Message | Description |
|---|---|---|---|
| Auth | 0901001 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901002 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901003 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901004 | Returned when a required request header is checked when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901005 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901006 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0901009 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0902012 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0902013 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0905032 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Auth | 0905033 | Returned during authentication or authorization when the request is not properly authenticated or authorized. Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. |
TimeoutThe request or the search session expired before it could be completed.
| Group | Code | Message | Description |
|---|---|---|---|
| Timeout | 0901011 | Returned by the API gateway when the operation or the session has expired. Restart the flow from the indicated step (for example, run Room Search again). |
Rate limitToo many requests were sent in a short period of time.
| Group | Code | Message | Description |
|---|---|---|---|
| Rate limit | 0901010 | Returned by the API gateway when too many requests are sent in a short period. Back off and retry after the interval stated in the message. Stay within your agreed request limits. |
Error groups
| Group | Meaning | Recommended action |
|---|---|---|
| Auth | Get a new token from the Authentication endpoint and check the Authorization header. Contact Etscore if access is still denied. | |
| Timeout | Restart the flow from the indicated step (for example, run Room Search again). | |
| Rate limit | Back off and retry after the interval stated in the message. Stay within your agreed request limits. |