Auth
Generate access token
Work with tokens.Generate new access token by authentication data.
Attention
When auth_type is admin and two-factor authentication is enabled you should pass one of these attributes: code or fingerprint. You can check two-factor authentication status with this request.
Required attributes by authentication type:
| admin | customer | api_key | session | |
|---|---|---|---|---|
| login | + | + | ||
| password | + | + | ||
| key | + | |||
| signature | + | |||
| nonce | + | |||
| session_id | + | |||
| code | * | |||
| fingerprint | * |
Labels description:
-
+ Always required.
-
* One of these attributes is required when two-factor authentication is enabled.
Possible errors
-
INVALID_TWO_FACTOR_CODE - Invalid two-factor code or fingerprint.
-
MISSED_TWO_FACTOR_CODE - Missed required two-factor code or fingerprint.
-
INVALID_AUTH_TYPE - Invalid authentication type. Allowed types: admin, customer, api_key or session.
post/admin/auth/tokens
Request
- Base URL: https://demo.splynx.com/api/2.0
- URL: https://demo.splynx.com/api/2.0/admin/auth/tokens
- Auth: HTTP basic
Request body
Example request
{
"auth_type": "customer",
"login": "bob",
"password": "hard_password"
}Response
Example response
{
"access_token": "2dbf3280cf9sb3b8a7c15201c76b9s1",
"access_token_expiration": 1542493076,
"refresh_token": "caebf3980cf9fb3b8c7c15501c77b980",
"refresh_token_expiration": 1578673076,
"permissions": []
}Changes
No recorded changes to this operation across all 1 revision of this API.