CustomDomain Docs
ReferenceAPI referenceApplications

Revoke an application's widget tokens issued until now

Revoke an application's widget tokens issued until now: CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.

POST
/applications/{id}/tokens:revoke

Every widget token of the application issued before the returned time is refused from now on (401); tokens minted afterwards work. Use it when a token or the client secret may have leaked. Widgets that hold a revoked token ask your server for a new one. Admin-or-above (keys:manage): a member/viewer API key is rejected with 403.

AuthorizationBearer <token>

Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/applications/string/tokens:revoke"
{  "application_id": "string",  "revoked_before": "2019-08-24T14:15:22Z"}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}