What are the possible reasons to get APNs responses BadDeviceToken or Unregistered?

前端 未结 6 1757
离开以前
离开以前 2021-02-01 14:38

When sending notifications to iOS users, for some of them I get response status code 400 (BadDeviceToken) or code 410 (Unregistered).

From Apple documentation about \"Ba

6条回答
  •  没有蜡笔的小新
    2021-02-01 15:32

    Status code '400' : You get this error when you try to send the notification with a wrong certificate. Make sure that you use production certificate for production environment. It is bad because you are using bad configurations.

    Status code '410' : Yes with this code we can understand that App has deleted. In our app when we get this status code we delete this token from db. The other scenario could be that user has reinstalled the app which could change his token. So its better you remove this token.

提交回复
热议问题