Expo Notifications InvalidProviderToken from APN when sending a new message

Please provide the following:

  1. SDK Version: I am using expo-notifications ~0.17.0 and expo-server-sdk": “^3.7.0”, for the server. in a React Native environment. So only the expo notifications
  2. Platforms(Android/iOS/web/all): IOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.
    I am getting the Expo Token from my client "ExponentPushToken[GoNyXgO3L87fwj_SIGnuTH].

using expo-server-sdk": “^3.7.0”, in a node Server.js. But when sending the following message with sendPushNotificationsAsync:[{“to”:[“ExponentPushToken[GoNyXgO3L87fwj_SIGnuTH]”],“accessToken”:“Lb9ifT86Vn6IWdYomQRnkZ56RySu3echnydRLZ6p”,“subtitle”:“subtitle”,“title”:“title”,“body”:“k”,“data”:{“user_id”:“393357828245”,“username”:“Maurizio Capobianco”,“channel”:“whatsapp”,“unread_count”:1,“message”:{“from”:“393357828245”,“id”:“wamid.HBgMMzkzMzU3ODI4MjQ1FQIAEhgWM0VCMDZGQjY2QzFEQUJCQjlGQjBEQwA=”,“timestamp”:“1684834797”,“text”:{“body”:“k”},“type”:“text”}}}]

I get [ { status: ‘ok’, id: ‘d1c7b272-cbf9-4dd0-9dc5-f6bf2e945aaa’ } ]

But then reading the receipt I get:
{“data”:{“d1c7b272-cbf9-4dd0-9dc5-f6bf2e945aaa”:{“status”:“error”,“message”:“The Apple Push Notification service failed to send the notification (reason: InvalidProviderToken, status code: 403). Read Apple’s docs about "Communicating with APNs" to learn what this error means.”,“messageEnum”:1006,“messageParamValues”:[“InvalidProviderToken”,“403”],“details”:{“apns”:{“reason”:“InvalidProviderToken”,“statusCode”:403},“error”:“InvalidCredentials”,“errorCodeEnum”:6,“sentAt”:1684834798},“__debug”:{}}}}%

Can anybody help? Thanks a lot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.