I am trying to send notifications to my android app via HMS push with Rest api.
The system works, but I can't find an api to find the Push Id (Token).
{
"validate_only": false,
"message": {
"notification": {
"title": "Notifica simpatica",
"body": "Io sono il body della notifica simpatica",
"notify_icon": "https://res.vmallres.com/pimages//common/config/logo/SXppnESYv4K11DBxDFc2.png"
},
"data": "{'param1':'value1','param2':'value2'}",
"android": {
"collapse_key": -1,
"urgency": "NORMAL",
"category": "PLAY_VOICE",
"ttl": "1448s",
"fast_app_target": 1,
"notification": {
"click_action": {
"type": 1,
"intent": ""
}
}
},
"token": [
"I NEED THIS"
]
}
}
I have read about a push subscription api for get it but after two days i don't find nothing :(
Please help me! Thanks!
PushToken can be received only from device. On device you should execute method for receiving it and then send this PushToken to your backend.
mohax's answer is correct. I'd like to add a little more:
The pushtoken is obtained by using the API provided by the SDK after the client integrates the Push SDK. After obtaining the pushtoken, you need to send it to the server.
For details, pls kindly refer to this Docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With