Revoke Universal Token (by id / name / token)

Revokes one Universal Token.

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

Description

  1. Supply exactly one of id, name, or token.
  2. Name resolves to the caller's own token only (name uniqueness is per admin, not per partner).
  3. Revoking one UT by id/name/token does not cascade to UATs minted from it.

Rate limit

30 requests / 60 seconds.


API Request

By id

curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization:  {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'id=row-id-789'

By name

curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization:  {{UNIVERSAL_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=prod-automation'

By token

curl --location --request POST 'https://partner.gupshup.io/partner/{{PARTNER_ID}}/auth/revoke' \
--header 'Authorization:  {{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": "invalid token format" }token could not be parsed.
400{ "status": "error", "message": "token missing jti claim" }Parsed JWT has no usable jti.
401{ "status": "error", "message": "Unauthorised access to the resource. Please review request parameters and headers and retry" }Missing/invalid authentication.
403{ "status": "error", "message": "Forbidden Access" }Path partnerId mismatch or not PARTNER_ADMIN.
404{ "status": "error", "message": "token not found" }No matching token for this partner / caller (also used for cross-partner probes).
410{ "status": "error", "message": "token has already expired; nothing to revoke" }Token already naturally expired.
429{ "status": "error", "message": "Too Many Requests" }More than 30 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
AuthorizationCaller credential{{UNIVERSAL_TOKEN}}StringRequired
partnerIdPartner ID (path)e.g. 8814IntegerRequiredMust match authenticated partner.
idToken row idfrom list APIStringExactly one of id/token/nameScoped to this partner.
nameToken labelprod-automationStringExactly one of id/token/nameResolves to caller's own active token only.
tokenRaw UT JWTJWT stringStringExactly one of id/token/namesub must equal partnerId.

Path Params
int64
required

Partner ID. Must match the partner resolved from email (mint),
or the authenticated partner context (list and revoke).

Form Data
string
required

Token row id from the list API. Scoped to this partner.

string

Token label. Resolves to the caller's own active token only.

string

Raw UT JWT. Its sub claim must equal partnerId.

Responses

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