Push Notification HTTP/2 API doesn't work

Hi Expo team,

I’ve tried to send notification to device, with the Push Notifiation Tool it just works fine as expected, but when I try to test it with the HTTP/2 API via Postman, it keep sending me this error

    "errors": [
            "code": "API_ERROR",
            "message": "\"to\" is required."

Anything I did it wrong? I’m sure I provide the “to” parameter in the message object as shown in photo, please help me to solve this problem thank you!

hm, that’s odd :thinking:

if you send your payload with curl instead of postman, i.e.

curl -H "Content-Type: application/json" -X POST "https://exp.host/--/api/v2/push/send" -d '{
  "to": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "body": "world"

what happens?

hi @charliecruzan,
thanks for your reply and sorry replying you so late, as you mentioned to send payload with curl it works as expected, probably it might be caused by some setting in Postman, but I didn’t see difference between the code you post above and generated by postman, so yeah that’s really odd

Hi Imdeveloper - Was you able to find what is wrong with using Postman? I actually run into exact same issue with this. Thank you and have a nice day.

Unfortunately I still can’t make it work, and I just used a work around with local server to test.
Hope this can help you even it’s quite late though, have a nice day