Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidProviderToken #477

Closed
j4nos opened this issue Nov 17, 2016 · 5 comments
Closed

InvalidProviderToken #477

j4nos opened this issue Nov 17, 2016 · 5 comments

Comments

@j4nos
Copy link

j4nos commented Nov 17, 2016

When sending message like in tutorial below, I get error: response: { reason: 'InvalidProviderToken' } } Any idea what I am doing wrong?

Apple says: APNs supports only provider authentication tokens that are signed with the ES256 algorithm. Unsecured JWTs, or JWTs signed with other algorithms, are rejected, and your provider server receives the InvalidProviderToken (403) response.

https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/

@j4nos j4nos changed the title apnProvider.send return failed apnProvider.send return failed, received error 403 Nov 17, 2016
@j4nos j4nos changed the title apnProvider.send return failed, received error 403 InvalidProviderToken Nov 17, 2016
@joachimboggild
Copy link

You can get a valid provider token on the Apple developer site, members section.

https://developer.apple.com/account/ios/certificate/

@sylvan-d-ash
Copy link

Make sure you are using the correct team ID and key ID

@nalogowiec
Copy link

@winter7621 I found team ID on apple dev website in the membership section, but I cannot locate anywhere key ID, can you tell me where to find it?

@touskar
Copy link

touskar commented Nov 29, 2016

@winter7621 you have to generate new certification from developer console .Certificate for Apple Push Notification token-based authentication".
Just choose Apple Push Notification Authentication Key (Sandbox & Production)and you will get a file named in this format:
APNSAuthKey_XXXXXXX.p8 where XXXXXX is your keyID

@brianfoody
Copy link

This was a helpful article for me. You will get your key id at the end of it.

http://gobiko.com/blog/token-based-authentication-http2-example-apns/

Look in the Membership section then for the Team Id like you said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants