Skip to main content

registerMyPushToken

Requires permission notifications:push-token:manage.

Registers a push-notification token for the signed-in staff user's device. 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:

mutation RegisterMyPushToken($input: RegisterPushTokenInput!) {
registerMyPushToken(input: $input)
}

Variables:

{
"input": {
"deviceId": "id",
"platform": "ANDROID",
"token": "string"
}
}

Response:

{
"data": {
"registerMyPushToken": true
}
}
registerMyPushToken(
input: RegisterPushTokenInput!
): Boolean!

Arguments​

registerMyPushToken.input ● RegisterPushTokenInput! non-null input​

The push token, the device ID, the platform and optionally the app version.

Type​

Boolean scalar​

The Boolean scalar type represents true or false.