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 | Description |
---|---|
token_type | Token type (Bearer) |
expires_in | Time in seconds, which shows when the token will expire |
access_token | Access token |
refresh_token | Refresh token |