Hey,
Here I am attaching both the requests.
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}%
I have attached a screenshot of the request submitted via the UI.(Timestamp: 11:10 AM IST)
Topic:
App & System Services
SubTopic:
Notifications
Tags: