APNS Notifications not received on macOS Device

Hello Team,

We are currently experiencing an issue where some of our devices are not receiving push notifications. We are sending notifications via the Apple Push Notification portal (https://developer.apple.com/notifications/push-notifications-console/) using the following two requests. However, in both cases, the notifications are not being delivered to the devices.

Scenario 1 :

When we send a request with apns-push-type set to alert, we receive the following error.

Request :

curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: alert"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/devicetoken

Response:

{

"code": 400,

"message": "bad-request",

"reason": "The device token is inactive for the specified topic. There is no need to send further pushes to the same device token, unless your application retrieves the same device token.",

"requestUuid": "c4ae39b4-87e1-4269-a1e9-163f60ec0385"

}

Scenario 2 :

However, if we send the request with apns-push-type set to background, the request is processed successfully by APNs, but no notification is received on the device.

Request :

curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: background"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/devicetoken

Response:

Getting a message that The notification sent successfully but no notification is received on the device.

In both cases (with alert and background push types), the push notification does not reach the device.

Additionally, when we validated the device token using the APNs Device Token Validator, it appears to be valid and returns the following message.

"Device Token is valid for sending Alert & Background push-type notifications in the Production environment"

Affected Device:

macOS version : MacOS 15.3.1

Processor : Apple M1

Could you please assist me in resolving this issue?

Thanks

A couple things here.

The response you quote:

{
  "code": 400,
  "message": "bad-request",
  "reason": "The device token is inactive for the specified topic. There is no need to send further pushes to the same device token, unless your application retrieves the same device token.",
  "requestUuid": "c4ae39b4-87e1-4269-a1e9-163f60ec0385"
}

does not seem correct. That specific "reason" should be accompanied by a code 410, and the message would have been "Unregistered".

If you do get an Unregistered error, it is possible to not get it afterwards due to propagation delay in the APNs server farm, but as soon as you get that error you can remove that token from your list of usable tokens.

Also, the response you quoted does not look like a curl response. And the response would contain an apns-id not a requestUuid.

Can you please try this again (both ways) and give use the actual "curl -v" output

Also please note the exact time and time zone of when you did this so we can check on our end what might be going on.

Hey, Here I am attaching both the requests.

  1. This is the CURL request that returns a 410 status with the 'Unregistered' error. (Timestamp: 11:07 AM IST)

~ % curl -v
--header "authorization: bearer ${AUTHENTICATION_TOKEN}"
--header "apns-topic: com.testcompany.sampletest"
--header "apns-push-type: alert"
--header "apns-priority: 10"
--header "apns-expiration: 0"
--data '{"aps":{"alert":{"title":"Test Notification Title","subtitle":"Test Notification Sub Title","body":"Test Notification Body"}}}'
--http2 https://api.push.apple.com:443/3/device/devicetoken Host api.push.apple.com:443 was resolved.

IPv6: (none)

IPv4: 17.188.169.222, 17.188.169.160, 17.188.170.97, 17.188.170.156, 17.188.169.28, 17.188.169.223, 17.188.169.92, 17.188.171.221

Trying 17.188.169.222:443...

Connected to api.push.apple.com (17.188.169.222) port 443

ALPN: curl offers h2,http/1.1

(304) (OUT), TLS handshake, Client hello (1):

CAfile: /etc/ssl/cert.pem

CApath: none

(304) (IN), TLS handshake, Server hello (2):

(304) (IN), TLS handshake, Unknown (8):

(304) (IN), TLS handshake, Request CERT (13):

(304) (IN), TLS handshake, Certificate (11):

(304) (IN), TLS handshake, CERT verify (15):

(304) (IN), TLS handshake, Finished (20):

(304) (OUT), TLS handshake, Certificate (11):

(304) (OUT), TLS handshake, Finished (20):

SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF

ALPN: server accepted h2

Server certificate:

subject: C=US; ST=California; O=Apple Inc.; CN=api.push.apple.com

start date: Feb 19 22:07:58 2025 GMT

expire date: Mar 11 18:55:14 2026 GMT

subjectAltName: host "api.push.apple.com" matched cert's "api.push.apple.com"

issuer: CN=Apple Public Server RSA CA 11 - G1; O=Apple Inc.; ST=California; C=US

SSL certificate verify ok.

using HTTP/2

[HTTP/2] [1] OPENED stream for https://api.push.apple.com:443/3/device/devicetoken

[HTTP/2] [1] [:method: POST]

[HTTP/2] [1] [:scheme: https]

[HTTP/2] [1] [:authority: api.push.apple.com]

[HTTP/2] [1] [:path: /3/device/devicetoken]

[HTTP/2] [1] [user-agent: curl/8.7.1]

[HTTP/2] [1] [accept: /]

[HTTP/2] [1] [authorization: bearer ${AUTHENTICATION_TOKEN}]

[HTTP/2] [1] [apns-topic: com.testcompany.sampletest]

[HTTP/2] [1] [apns-push-type: alert]

[HTTP/2] [1] [apns-priority: 10]

[HTTP/2] [1] [apns-expiration: 0]

[HTTP/2] [1] [content-length: 126]

[HTTP/2] [1] [content-type: application/x-www-form-urlencoded]

POST /3/device/devicetoken HTTP/2 Host: api.push.apple.com User-Agent: curl/8.7.1 Accept: / authorization: bearer ${AUTHENTICATION_TOKEN} apns-topic: com.testcompany.sampletest apns-push-type: alert apns-priority: 10 apns-expiration: 0 Content-Length: 126 Content-Type: application/x-www-form-urlencoded

upload completely sent off: 126 bytes

< HTTP/2 410 < apns-id: FC84044A-A9F1-726D-F553-A078440B036B < Connection #0 to host api.push.apple.com left intact

{"reason":"Unregistered","timestamp":1752847562639}%

  1. I have attached a screenshot of the request submitted via the UI.(Timestamp: 11:10 AM IST)

APNS Notifications not received on macOS Device
 
 
Q