Revoke Refresh Token
When you fail to refresh the access token, first check if the refresh token expires. If the refresh token doesn't expire, the refresh token may be stolen. You should revoke the old refresh token, then get a new access token.
Request URL
DELETE {base_url}/dm/open_api/oauth/token/refresh_token
Request parameters
BodyParameter | Required | Type | Description |
---|---|---|---|
client_id | Yes | String | Client ID. Obtain the Client ID from the YCM web interface. |
client_secret | Yes | String | Client Secret. Obtain the Client Secret from the YCM web interface. |
Response parameters
Parameter | Type | Description |
---|---|---|
client_id | String | Client ID. |
effect_time | Long | Time of taking effect. Note: The
parameter returns a timestamp, you can convert the timestamp
to detailed date and time as needed. For more information,
see Convert Timestamp to Local Date and Time. |
Examples
Request example
DELETE /dm/open_api/oauth/token/refresh_token HTTP/1.1
Host: ycm.yeastar.com
Content-Type: application/x-www-form-urlencoded
client_id=kp9yyntmueXXXXXXXXX&client_secret=Z7wC807wK9zR77FCOqsVXXXXX
Response example
HTTP/1.1 200 OK
{
"client_id": "kp9yyntmuesuk5joWvMkTbCBxqOXXXXX",
"effect_time": 1638959909
}