revokeConsumerSessions
mutation · in the family Identity and access
What it does
Sign a shopper out everywhere — revoke all their sessions, as staff.
Staff: the revoke-ALL kill-switch pointed at a consumer; revokes every currently-active session of the named consumer, returns the count. Template class (identity & access admin — the high-authority row); requires the unrestricted capability.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Identity and access — Who can sign in and what each role allows — users, roles and their assignments.
Roles that may call it:
- Owner
- System Administrator
- An API key whose scope allows
api:revokeConsumerSessions
Careful
Use on compromise suspicion; the customer signs in fresh.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
consumerId | ID ID! | yes |
Returns
Int Int! — A whole number.
Example request
mutation ExampleRevokeConsumerSessions($consumerId: ID!) {
revokeConsumerSessions(consumerId: $consumerId)
}Variables:
{
"consumerId": "01900000-0000-7000-8000-3cbb3ce90000"
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"revokeConsumerSessions": 1
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)