Push notifications from own server

Hello!
Have a strange problem. Built standalone android app, try to send notification through https://expo.io/dashboard/notifications and it passed ok and shown on the device.
But if I try to run
curl -H "Content-Type: application/json" -X POST "https://exp.host/--/api/v2/push/send" -d '{ "to": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]", "title":"hello" }'
via command line of my VDS, I get message
{"data":{"id":"9f429865-2724-4fe7-8486-82565d3c4b82","status":"ok"}}
seems like all is okay, but there is no push on my device.
Same problem with my golang API server on this VDS. What is wrong?

Okay. Just had some digging.
We have a link https://github.com/oliveroneill/exponent-server-sdk-golang in Expo’s documentation
Default GoLang structure for request has a field Body with an empty ("") initial value. And if it is empty, it is not passed to a json string, which needed by Expo push API. In result, expo server responses that all is okay, but does not show a notification.
In another words, we need to set up the Body clearly. Without empty values.
Created issue in Github.

Problem is that Expo push API does not report about missing field.

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