Unknown APNs ERROR: BadEnvironmentKeyInToken when sending Push To Talk notifications

We’re sending PTT notifications from our server and are receiving HTTP 403 from APNs for certain phones with the reason field BadEnvironmentKeyInToken. I can’t find this reason documented in Apple’s public error list. I’d like to confirm what this error specifically means and how to resolve it. Any guidance or clarification would be greatly appreciated. Thank you. Here is the document I was referring to. https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

Crazy that there's an error that is not documented. Anyhow, I think I got this because I was using a p8-file that was for production only but a device token generated for development environment. Fix: re-generate a p8-file for both development and production. Update APNS_KEY_PATH and APNS_KEY_ID accordingly.

Unknown APNs ERROR: BadEnvironmentKeyInToken when sending Push To Talk notifications
 
 
Q