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.
HTTP method and endpoint
DELETE /oauth/token/refresh_token?refresh_token={refresh_token}&client_id={client_id}&client_secret={client_secret}
Request parameters
| Parameter | Importance | Description |
| refresh_token | Required | The latest refresh_token value. |
| client_id | Required | Client ID. Obtain the Client ID from the YMP web interface. |
| client_secret | Required | Client Secret. Obtain the Client Secret from the YMP web interface. |
Examples
Request example
DELETE /oauth/token/refresh_token?refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9uYW1lIjoiY2VjaWxpYUB5ZWFzdGFyLmNvbSIsInNjb3BlIjpbInRydXN0Il0sImF0aSI6IjA4OGY2MDE5LTIxYjctNGNhMS04NDBmLTZhZjA4Y2NlYTNkMiIsImV4cCI6MTU0ODIxMzM1NiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9hZG1pbiJdLCJqdGkiOiI5MTc2ZDY1MC1lNmJiLTQ4NDEtODVhOS05MDZmMWY5MjkxNWIiLCJjbGllbnRfaWQiOiI5Nzg5OTNmMDk2YzQ0MTFmYTljYzgwZWUyZTYyZjFmMiJ9.WOtqgOgPfaZ4PzVxOsNWf2CFPL8KqYVS-i5IwK3ARZA&client_id=978993f096c4411fa9cc80ee2e62f1f2&client_secret=7f8177760b4c491bb62e93b252069c49 HTTP/1.1 Host: ympapi.yeastarcloud.com Cache-Control: no-cache
Response example
A new refresh token is generated.
HTTP/1.1 200 OK eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2dpbl9uYW1lIjoiY2VjaWxpYUB5ZWFzdGFyLmNvbSIsInNjb3BlIjpbInRydXN0Il0sImF0aSI6IjA4OGY2MDE5LTIxYjctNGNhMS04NDBmLTZhZjA4Y2NlYTNkMiIsImV4cCI6MTU0ODIxMzM1NiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9hZG1pbiJdLCJqdGkiOiI5MTc2ZDY1MC1lNmJiLTQ4NDEtODVhOS05MDZmMWY5MjkxNWIiLCJjbGllbnRfaWQiOiI5Nzg5OTNmMDk2YzQ0MTFmYTljYzgwZWUyZTYyZjFmMiJ9.WOtqgOgPfaZ4PzVxOsNWf2CFPL8KqYVS-i5IwK3ARZA