Token deregistration

For push providers only, Knock provides an opt-in, provider-agnostic token management capability known as token deregistration. Knock removes invalid tokens from a recipient's corresponding channel data if that token results in a bounced message on send.

This setting is applicable across all push providers, excluding OneSignal when the recipient_mode is "ExternalID". In this case, Knock only has knowledge of the user's id and therefor cannot deregister the associated external token.

Workflow overrides are not available for Token deregistration. This capability can only be configured at the provider level.


ProviderToken deregistraiton available?
OneSignal (player_id)
OneSignal (external_id)

Configuring Knock token deregistration

You can configure Knock tracking on a per-environment basis using your channel's per-environment configurations. Token deregistration will default to ON when you first create a channel.

An image of a preference set

Working with Knock token deregistration

Knock Webhooks

If you use Knock's outbound webhooks, you can view the invalid token in the message.bounced events captured. If token deregistration is ON, no further intervention is needed for token removal. See the outbound webhooks guide for more details.

How it works

Token deregistration

When Knock attempts to send a message to one of the supported Push providers, any errors due to invalid or expired tokens will result in a bounce. If the message bounces, a corresponding message.bounced event is published containing the erroneous token.

Knock will remove the invalid token from the list of tokens present in the recipient's channel data. This allows for an automated audit of the tokens present for recipients.