Log In for Tokens
Obtain an access token and refresh token using a username and password.
POST
https://console.synleapenergy.com/open-api/v1/token/login Body parametersapplication/json
userNamestringRequiredUsername, up to 64 characters.
passwordstringRequiredPassword, up to 72 characters.
Usage notes
- Access tokens are valid for 24 hours and refresh tokens for 90 days.
Responses
200Successful responseapplication/json
| Field | Type | Description |
|---|---|---|
accessToken | string | Access token used to call business endpoints. |
refreshToken | string | Refresh token used to obtain new tokens. |
accessExpiresAt | integer | Access token expiry in Unix epoch milliseconds. |
refreshExpiresAt | integer | Refresh token expiry in Unix epoch milliseconds. |
4xx / 5xxError responseapplication/json
| HTTP status | Error code | Description |
|---|---|---|
| 400 | 400 | Invalid login request. Check that userName and password are non-empty and within limits. |
| 403 | 1050041007 | visit-tenant-id is not allowed |
| 429 | 1050041008 | Rate limit exceeded; wait Retry-After seconds |
| 429 | 1050041010 | The account has more than 10 tokens at the same time. |
| 401 | 1050041014 | Login authentication failed |
| 503 | 500 | The service is temporarily unavailable. Try again later. |