Revoke Universal App Token (by id / name / token)

Revokes one UAT for the app. Supply exactly one of id, name, or token (raw JWT value).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Description

  1. Revoking a UAT never affects the UT that minted it.
  2. No email is sent on UAT revoke.

Rate limit

10 requests / 60 seconds


API Request

By id

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=6f2c9e1a-...'

By name

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=webhook-service'

By token

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/token/revoke' \
--header 'Authorization: Bearer {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=eyJhbGciOiJSUzI1NiJ9...'

Response

Status CodeResponseComments
200{ "status": "success", "scope": "id" }Success. scope is id, name, or jti depending on the input used.
400{ "status": "error", "message": "supply exactly one of id, token, name" }None or more than one of id / token / name supplied.
400{ "status": "error", "message": "Partner is not authorized" }App not linked to the authenticated partner.
400{ "status": "error", "message": "invalid token format" }token could not be parsed.
400{ "status": "error", "message": "token is not a valid app token" }JWT is not an AT (tt=AT) or missing jti.
401{ "status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry" }Missing/invalid authentication.
404{ "status": "error", "message": "token not found" }No matching UAT for this app (also used when raw token subappId).
410{ "status": "error", "message": "token has already expired; nothing to revoke" }Token already naturally expired.
429{ "status": "error", "message": "Too Many Requests" }More than 10 requests / 60 seconds.
500{ "status": "error", "message": "Internal server error. Please try again later and If Issue still persist then contact Gupshup Dev Support" }Unexpected server failure.

Request Parameters

KeyDescriptionValuesData TypeRequired / OptionalConstraints
AuthorizationUniversal Token (UT)Bearer {{UNIVERSAL_TOKEN}}StringRequiredMust be a verified UT Bearer.
appIdApp ID (path)UUIDStringRequiredMust be linked to the caller's partner.
idToken row idfrom list APIStringExactly one of id/token/nameMust belong to this appId.
nameToken labelwebhook-serviceStringExactly one of id/token/nameMust match an active UAT for this app.
tokenRaw UAT JWTJWT stringStringExactly one of id/token/nameMust be tt=AT with sub = appId.

Path Params
uuid
required

App ID. Must be linked to the caller's partner.

Form Data
string
required

Token row id from the list API. Must belong to this appId.

string

Token label. Must match an active UAT for this app.

string

Raw UAT JWT. Must be tt=AT with sub = appId.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json