Connecting to APNS from push server via 443

Hello,

I'm wondering about statement in article https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW1 that it is possible to connect to APNS via 443 to send Push Notifications (not receiving / device connection) and not only on 2195 / 2196. Also I'm wondering why in this article port 2197 is mentioned as alternative to 443.

What is wrong here, or has anybody tried to send Push Notifications via api.push.apple.com:443 ?


Many thanks and regards,

Jago

Answered by jonchambers in 176107022

The new, HTTP/2-based APNs API uses port 443 and/or 2197. The old "binary notification format" version of the API still uses ports 2195/2196. Note that the two versions of the APNs API are completely incompatible; you can't use ports 443 or 2197 with the old version of the API.


The HTTP/2-based API provides two ports as a convenience. They're functionally equivalent, but providers may choose to use one or the other based on things like proxy or firewall settings. If you're using the HTTP/2-based API and you don't know that you need to use port 2197, you should probably just use port 443, which is the default port for HTTPS traffic.


It may also bear mentioning that the old API used port 2195 for sending notifications and port 2196 for the "feedback service," which would tell callers which tokens have expired. The feedback service no longer exists in the HTTP/2-based API.

Accepted Answer

The new, HTTP/2-based APNs API uses port 443 and/or 2197. The old "binary notification format" version of the API still uses ports 2195/2196. Note that the two versions of the APNs API are completely incompatible; you can't use ports 443 or 2197 with the old version of the API.


The HTTP/2-based API provides two ports as a convenience. They're functionally equivalent, but providers may choose to use one or the other based on things like proxy or firewall settings. If you're using the HTTP/2-based API and you don't know that you need to use port 2197, you should probably just use port 443, which is the default port for HTTPS traffic.


It may also bear mentioning that the old API used port 2195 for sending notifications and port 2196 for the "feedback service," which would tell callers which tokens have expired. The feedback service no longer exists in the HTTP/2-based API.

Connecting to APNS from push server via 443
 
 
Q