Revoke Access API

Use Case


This API is used for expiring user’s token. This is required when a customer deletes/delink his/her account or logs in with a new mobile number in your application


Request Attributes:

API Content format: JSON

Query Param:

PARAMETERDESCRIPTIONREQUIREDEXAMPLE VALUE
session_tokenThis is the user’s access token.Yes003d34901c47-3217-4e92-a291-5ef84a00de1e

Header:

PARAMETERDESCRIPTIONREQUIREDEXAMPLE VALUE
AuthorizationThis is a base64 encoded string of “clientId:clientSecret”YesBasic dGVzdGNsaWVudDplODY3MDlkOS1iMjM4LTQ4MjMtODVkYi05zZhMTY5YjMyNTg=

Body

  • Request body is not required for this API.

  • It should be handled on HTTP response codes only.

Response Attributes-

API Content format: JSON

HTTP CODEDESCRIPTION
200Access token successfully deleted.
404Access token not found.
401Authorization header invalid.

Endpoints

Staging: https://accounts-uat.paytm.com/oauth2/accessToken/SESSION_TOKEN

Production: https://accounts.paytm.com/oauth2/accessToken/SESSION_TOKEN

Request Code
curl -X DELETE 'https://accounts-uat.paytm.com/oauth2/accessToken/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -H 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'