Service API · eKYC Platform
Log in
POST/auth/users/login
Exchanges an account username and password for the JWT access token that every other Service API endpoint requires.
Request
MethodPOST
Path/auth/users/login
Content-Typeapplication/json
Auth requiredNo
The client authenticates using user_name and password to receive a JWT access token.
Base endpoint:
- PH: https://ekyc-platform-ph-staging.trustingsocial.com/api
- VN: https://ekyc-platform-vn-staging.trustingsocial.com/api
- IN: https://ekyc-platform-in-staging.trustingsocial.com/api
- ID: https://ekyc-platform-id-staging.trustingsocial.com/api
- MX: https://ekyc-platform-mx-staging.trustingsocial.com/api
- Global Vision Score: https://platform.visionscore.ai/api
Production
The production host follows the same naming pattern, with `-production` in place of `-staging` — for example, `https://ekyc-platform-ph-production.trustingsocial.com/api`.
| Name | Type | Required | Description |
|---|---|---|---|
user_name | string | Required | Account username. |
password | string | Required | Account password. |
Response
On success the HTTP status code is 200 and the token arrives on data.access_token. Send it as Authorization: Bearer <JWT> on every other Service API call — see Authorization.
{"data":{"access_token":"<JWT>"},"message":"login success","time":"2024-10-31T07:34:52Z","verdict":"success"}
Failure codes
| Name | Description | Status code | Response Body |
|---|---|---|---|
| Bad Request | Invalid username pattern | 400 | {"data":{"invalid_parameters":["user_name"],"parameter_formats":{"user_name":"[regex: ^[a-z0-9_]{1,63}$]"}},"message":"some parameters has invalid format","time":"2024-11-06T03:30:42Z","verdict":"invalid_parameters"} |
| Unauthorized | Incorrect username or password | 401 | {"data":{},"message":"username or password is incorrect","time":"2024-10-31T07:50:22Z","verdict":"invalid_credential"} |
| Invalid Method | Invalid URL or method | 405 | {"data":{},"message":"method is not correct for the requested route","time":"2024-11-06T03:23:26Z","verdict":"invalid_method"} |
| Too many requests | Too many failed login attempts | 429 | {"data":{},"message":"too many failed login attempts","time":"2024-11-06T03:33:43Z","verdict":"limit_exceeded"} |
| Internal Server Error | Internal Server Error | 500 | {"data":{},"message":"Unexpected error. Error ID: ff4d5572d9df4560bb6dabc2eadd5a1e","time":"2024-11-06T03:32:09Z","verdict":"failure"} |