I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131 Invalid APNs credentials Possible Causes Credential (certificate and private key) is invalid. Certificate expired. Possible Solutions Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
- Specific APN Apple Push Services Certificate, for a unique APP ID I get the 52131 error.
- I did not tick use for sending to Sandbox credential. As it is a push credentiual
- I followed all the instructions perfectly for exporting the certificate keys.
- I also use separate API Keys and a separate Programmable chat.
- I get registration of bindings but no notifications as the certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101