unregisterMyPushToken
Requires permission notifications:push-token:manage.
Removes the push-notification token of one of the signed-in staff user's devices. Requires permission to manage push tokens.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UnregisterMyPushToken($input: UnregisterPushTokenInput!) {
unregisterMyPushToken(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UnregisterMyPushToken($input: UnregisterPushTokenInput!) {\n unregisterMyPushToken(input: $input)\n}",
"variables": {
"input": {
"deviceId": "id"
}
}
}
EOF
Variables:
{
"input": {
"deviceId": "id"
}
}
Response:
{
"data": {
"unregisterMyPushToken": true
}
}
unregisterMyPushToken(
input: UnregisterPushTokenInput!
): Boolean!
Arguments
unregisterMyPushToken.input ● UnregisterPushTokenInput! non-null input
The ID of the device to remove.
Type
Boolean scalar
The Boolean scalar type represents true or false.