Revoke a session before it is used
POST /api/embed/ads-sessions/{sessionId}/revokeKills the token immediately: the iframe stops resolving. It is the way out if the embed_url leaked before expiring. A completed session cannot be revoked. Requires the marketing:manage scope.
Responses
Section titled “Responses”| Status | Description | Schema |
|---|---|---|
200 | — | EmbedAdsSessionViewDto |
Example
Section titled “Example”curl -X POST https://api.neike.dev/api/embed/ads-sessions/{sessionId}/revoke \ -H "x-neike-api-key: whk_live_…"EmbedAdsSessionViewDto
Section titled “EmbedAdsSessionViewDto”| Field | Type | Description | |
|---|---|---|---|
session_id | string | required | Example: "nkes_9fQ2aB…". |
status | pending · opened · completed · revoked · expired | required | pending (nobody opened the iframe), opened, completed, revoked or expired (computed on read). |
provider | meta | required | — |
allowed_origins | string[] | required | — |
external_ref | string | optional | — |
result | object | optional | With status: completed, { provider, ad_accounts: [{ ad_account_id, name, status }] }, the accounts the end user activated. While the session is in progress it carries the accounts that the Meta login discovered. |
last_error | string | optional | — |
expires_at | string (date-time) | required | — |
opened_at | string (date-time) | optional | — |
completed_at | string (date-time) | optional | — |
created_at | string (date-time) | required | — |