That would be neat if I understand a simple way to send a push to a particular dude's phone. So far I've not yet understood how...
curl -3 -u "{variantID}:{secret}"
-v -H "Accept: application/json" -H "Content-type: application/json"
-X POST
-d '{
"deviceToken" : "someTokenString",
"alias" : "myUniqueString"
}'
https://SERVER:PORT/context/rest/registry/device
Now, the above does store this string (the alias
) on the device metadata.
Filter exactly that one device (for user w/ alias myUniqueString
) for send:
curl -3 -u "{PushApplicationID}:{MasterSecret}"
-v -H "Accept: application/json" -H "Content-type: application/json"
-X POST
-d '{
"alias" : ["myUniqueString"],
"message": {
"alert":"HELLO!"
}
}'
https://SERVER:PORT/context/rest/sender
NOTE: that the alias
is used here (on the send) to filter/query that exact user.
-M