APN 429's (TooManyProviderTokenUpdates)

Hi All,

I have a question about 429's.

I have two different keys, and am generating tokens for each key and refreshing them in 1h intervals.

I have been receiving a large number of 429's, sometimes lasting about 2 hours.

My question is - will I get 429's for updating tokens per key too frequently or are the 429's based on updating any key for my team id too frequently?

Accepted Answer

APNs does not distinguish multiple tokens generated using different keys contemporarily vs. the same key being used for the same TeamID.

If you are using multiple keys for simultaneously, for example for use by multiple push providers, you need to find a way to avoid generating multiple tokens for the same TeamID.

It is not clear why you are using multiple keys, but here are a number of additional points to be careful about depending on your use case: 1- APNs expects developers to use the same authentication token for as close to one hour as possible. A good logic would be to generate a new token if the existing one is older than an hour.

2- If you are using multiple keys on the same server, generating tokens on the same connection you will receive this error as well. You need to use separate connections, even from the same physical server.

3- Authentication tokens for more than one team on the same connection is not supported. If the push server is shared by multiple apps using multiple keys, instead of using the same connection pool to send the push requests you should isolate the connection pool for each app.

Thanks Gualtier! This helped us resolve our issue.

We had multiple resources for a single push provider.

Each resource has it's own set of credentials, and we only updated one resource to use the new key.

Once we updated all of the resources to use the same creds key, everything worked fine.

As a follow up question, can you point me to any public facing documentation that notes how long we should expect to see 429 (TooManyProviderTokenUpdates) responses when one of the above mentioned scenarios is violated?

APN 429's (TooManyProviderTokenUpdates)
 
 
Q