registerPushToken
Requires a customer (portal or buyer app) session.
Register an Expo push token for the buyer's device.
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 RegisterPushToken($input: RegisterPushTokenInput!) {
registerPushToken(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RegisterPushToken($input: RegisterPushTokenInput!) {\n registerPushToken(input: $input)\n}",
"variables": {
"input": {
"deviceId": "id",
"platform": "ANDROID",
"token": "string"
}
}
}
EOF
Variables:
{
"input": {
"deviceId": "id",
"platform": "ANDROID",
"token": "string"
}
}
Response:
{
"data": {
"registerPushToken": true
}
}
registerPushToken(
input: RegisterPushTokenInput!
): Boolean!
Arguments
registerPushToken.input ● RegisterPushTokenInput! non-null input
The details of the push token to register.
Type
Boolean scalar
The Boolean scalar type represents true or false.