Generate an access token by providing your Account ID and App Secret. The token is required for all subsequent API requests.
Tokens expire after 600 seconds (10 minutes). Refresh before expiry using GET /auth/refresh-token.
Request body
Your Yativo Account ID. Found in your dashboard under Settings → Account.
Your App Secret generated from Dashboard → Developer → API Key. Keep this confidential and never expose it in client-side code.
curl -X POST 'https://api.yativo.com/api/v1/auth/login' \
-H 'Content-Type: application/json' \
-d '{
"account_id": "your-account-id",
"app_secret": "your-app-secret"
}'
{
"status": "success",
"status_code": 200,
"message": "Authentication successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"token_type": "bearer",
"expires_in": 600
}
}
Refresh Token
Refresh an expiring token without re-authenticating with your credentials:
curl -X GET 'https://api.yativo.com/api/v1/auth/refresh-token' \
-H 'Authorization: Bearer YOUR_CURRENT_ACCESS_TOKEN'
{
"status": "success",
"status_code": 200,
"message": "Request successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
"expires_in": 600
}
}