post
https://partner.gupshup.io/partner/app//token/revoke
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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Description
- Revoking a UAT never affects the UT that minted it.
- 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 Code | Response | Comments |
|---|---|---|
| 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 sub ≠ appId). |
| 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
| Key | Description | Values | Data Type | Required / Optional | Constraints |
|---|---|---|---|---|---|
| Authorization | Universal Token (UT) | Bearer {{UNIVERSAL_TOKEN}} | String | Required | Must be a verified UT Bearer. |
| appId | App ID (path) | UUID | String | Required | Must be linked to the caller's partner. |
| id | Token row id | from list API | String | Exactly one of id/token/name | Must belong to this appId. |
| name | Token label | webhook-service | String | Exactly one of id/token/name | Must match an active UAT for this app. |
| token | Raw UAT JWT | JWT string | String | Exactly one of id/token/name | Must be tt=AT with sub = appId. |
