title: Twilio Chat IOS Production APN Certifications Error-52131
body: <p>I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:</p>
  
  <p>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.</p>
  
  <p>When I test my sandbox APN certifcates the push notifications work perfectly.</p>
  
  <p>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... <a href="https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f" rel="nofollow noreferrer">https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f</a></p>
  
  <p>Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box</p>
  
  <p>However in the production version, where I am using:</p>
  
  <ul>
  <li>Specific APN Apple Push Services Certificate, for a unique APP ID I
  get the 52131 error. </li>
  <li>I did not tick use for sending to Sandbox    credential. As it is a
  push credentiual  </li>
  <li>I followed all the    instructions perfectly for exporting the
  certificate keys.</li>
  <li>I also use    separate API Keys and a separate Programmable chat.</li>
  <li>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</li>
  </ul>
  
  <p>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?</p>
  
  <p>This was the thread: <a href="https://github.com/twilio/voice-quickstart-objc/issues/101" rel="nofollow noreferrer">https://github.com/twilio/voice-quickstart-objc/issues/101</a></p>