apns response TooManyProviderTokenUpdates

Whenever I send a push notification to apns from my development environment I get status: '429', response: 'TooManyProviderTokenUpdates'. However this does not happen in my production environment.


I don't know too much about how the provider tokens are updated but what does this actually mean and why would it be happening?

When you send a push notification request to the APNs service, you send one for each unique device token. For example, if you want to send a push notification to 100 unique devices, you send 100 requests. Each request has a unique device token.


The error you are receiving indicates that instead of sending a single request to each device token, you are instead sending numerous requests to the same device token. You are sending too many updates to the same token.


[Some suggestions]

If you have a way to check your code, verify that your device tokens being sent in the requests are unique.

Make sure your code does not have a repetition loop in there whch might be sending multiple requests to each device.

I believe the answer provided by LazyInstantiation is incorrect and they are conflating DeviceTokens (unique token that identifies an app on a specific device) with ProviderTokens (used for token-based authentication when making requests to APNs).

According to the APNs documentation, the 429 response with error string 'TooManyProviderTokenUpdates' means

The provider’s authentication token is being updated too often. Update the authentication token no more than once every 20 minutes.

Make sure you are not generating a new provider token for each request. The same provider token should be re-used (it should be refreshed before the 60 minute expiration but not more frequently than 20 minutes).

I am also facing same issue TooManyProviderTokenUpdates with status code as 429, but I am getting this error for all users I am getting this for some users.

I am using apns2 plugin to send notification and as signing key I am using .p8 file downloaded from developer account.

Can someone explain me what's wrong with this

I am also facing the same issue in development I tried using the same token that was generated with .p8 file now is fine in development on production I haven't test yet

apns response TooManyProviderTokenUpdates
 
 
Q