post
https://{subdomain}.kommo.com/oauth2/access_token
The method allows you to exchange an authorization code to access token and refresh token
Example of request body (getting an access code and refresh code)
{
"client_id": "xxxx",
"client_secret": "xxxx",
"grant_type": "authorization_code",
"code": "xxxxxxx",
"redirect_uri": "https://test.test"
}Example of request body (getting a new access token once it expires)
{
"client_id": "xxxx",
"client_secret": "xxxx",
"grant_type": "refresh_token",
"refresh_token": "xxxxx",
"redirect_uri": "https://test.test"
}Response parameters
| Parameter | Data type | Description |
|---|---|---|
| token_type | string | Token type (Bearer) |
| expires_in | int | Time in seconds, which shows when the token will expire |
| server_time | int | Token issue time on server |
| access_token | string | Access token |
| refresh_token | string | Refresh token |