APNS api address

Hello,


According to APNS documentation; (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)


Apple specificy the following api address when communicating with APNS;


I've tried both of these url's using port's 443 & port 2197 both not working with 443 always returning a connection refused error.


My 443 & 2197 ports are open for inbound & outbound traffic.


However, if I use the following url gateway.sandbox.push.apple.com:2195, everything works as expected.


Can anybody provide any reason why the documentation does not specify what works?


Thanks,

James

bump - surprised there is no answer to this.

Encountered the same issue. In their list of ports there are no more 2197 only 2195 now

https://support.apple.com/en-vn/HT202944


Can't believe it's been months and nobody bothers to fix the doc yet.

I got a message about push servers updating. Is this only true/applicable for apps or does this apply to web service code that may use the push notification service (as I'm using)? I too have been using gateway.sandbox.push.apple.com:2195 since 2012 without issue. Will that stop working after the change?
Legacy ports 2195 and 2196 are deprecated and will not be supported after the legacy binary protocol is turned off on March 31, 2021

It is recommended that you upgrade your Push Notification service to use the new HTTP/2 protocol, which uses port 2197

If you use Wi-Fi behind a firewall, or using Private Access Point for cellular data, make sure you can connect to specific ports.
You need a direct, *unproxied* connection to the APNs servers on these ports:
  • TCP port 5223 to communicate with APNs.

  • TCP port 443 or 2197 to send notifications to APNs.

  • TCP port 443 is required during device activation, and afterwards for fallback (on Wi-Fi only) if devices can't reach APNs on port 5223.

The APNs servers use load balancing, so your devices don't always connect to the same public IP address for notifications. It's best to let your device access these ports on the entire 17.0.0.0/8 address block, which is assigned to Apple.

Refer to https://support.apple.com/en-us/HT203609 if your Apple devices aren't getting Apple push notifications.



You are refused as APNs accept only HTTP/2 connections (any port). You cannot use Postman as Postman does not support HTTP/2 so you need to build something for testing. Apple wants us to use one connection for multiple deliveries (like DB) and that is the reason they have switched to HTTP/2 where you connect, then send any number of messages and keep connected.

APNS api address
 
 
Q