pigeon icon indicating copy to clipboard operation
pigeon copied to clipboard

Too many provider token updates

Open andrewtimberlake opened this issue 3 years ago • 1 comments

I’m getting an error response: :too_many_provider_token_updates

The code here shows that token is refreshed every minute instead of “no more than once every 20 minutes” as the APNS documentation requires.

https://github.com/codedge-llc/pigeon/blob/e5ca4be49f10e41ea06bcf7695ac9351ad40c91f/lib/pigeon/apns/jwt_config.ex#L127

Documentation extract

Status code Error string Description
429 TooManyProviderTokenUpdates The provider’s authentication token is being updated too often. Update the authentication token no more than once every 20 minutes.

I’d be happy to submit a pull request to help.

andrewtimberlake avatar Aug 16 '22 08:08 andrewtimberlake

Sorry, there is an obvious mistake in my bug report, 3_590 is just less than one hour 🤦‍♂️ so that’s not the problem. The problem seems to be that multiple workers should all be using the same token.

andrewtimberlake avatar Aug 17 '22 07:08 andrewtimberlake