Authorization
API to authorization and get new access token using refresh token using application credentials and authorization code
Access Token & Refresh Token: To get access token and refresh token pass grant_type as authorization_code
Get New Access Token: Then access token issues in above step will expire after 1 hour. To get new access token use refresh_token which is issued in above step and grant_type as refresh_token.
Note: code is required when grant_type is authorization_code and refresh_token is required when grant_type is refresh_token
POST
/token
curl \
-X POST https://api-console.logezy.co/v1/token \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"application_id":"string","client_id":"string","client_secret":"string","grant_type":"string","code":"string"}'
Request examples
# Headers
Accept: application/json
# Payload
{
"application_id": "string",
"client_id": "string",
"client_secret": "string",
"grant_type": "string",
"code": "string"
}
Response examples (200)
Refresh token
{
"ttl": 3600,
"client_id": "OTM5NzUxNWQtMWRmYi00NWE5LWE0OTktOGY5ZGRjNWM3N2M2",
"token_type": "Bearer",
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9hcGkubG9jYWxob3N0OjgwMDBcL3YxXC90b2tlbiIsImlhdCI6MTY3MTQ2MTk2OSwiZXhwIjoxNjcxNDY1NTY5LCJuYmYiOjE2NzE0NjE5NjksImp0aSI6ImlGcm1ialpkaVpweFZSS0YiLCJzdWIiOjcxNTIyLCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.ISIKj_mZShOv4bgx2hCZLRFCcoa83j_AZ5poW5YC1P8",
"refresh_token": "M2MxYjgxMmUtYzUyZi00Zjc4LWFjMTMtMDQ2MWM0YzgwNDkz",
"application_id": "73b3aab2-d1de-4ce2-ae82-ded953ff755e"
}
{
"ttl": 3600,
"client_id": "OTM5NzUxNWQtMWRmYi00NWE5LWE0OTktOGY5ZGRjNWM3N2M2",
"token_type": "Bearer",
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9hcGkubG9jYWxob3N0OjgwMDBcL3YxXC90b2tlbiIsImlhdCI6MTY3MTQ2MjAzNSwiZXhwIjoxNjcxNDY1NjM1LCJuYmYiOjE2NzE0NjIwMzUsImp0aSI6InJlZG9aN3RGdm1hSGxPbW0iLCJzdWIiOjcxNTIyLCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.48pkW_n_yD8_4DviTzg0Vy3SrqBrD8NK_jhrz1tdLyI",
"application_id": "73b3aab2-d1de-4ce2-ae82-ded953ff755e"
}