push notification with REST API


I want push notification with
I’have tested push notification with platform The notification work and good receive in android device.
But if i test push notification by REST API with request by PostMan:

Content-Type application/json
Authorization Bearer {token}
{ "profile": "pushserver", "notification": { "title": "test", "message": "shit" } }
{ "data": { "status": "open", "created": "2016-08-23T08:29:31.699889+00:00", "app_id": "8c16d5af", "uuid": "f7cdd116-cdef-4e1e-9112-40af2e5597d7", "state": "enqueued", "config": { "notification": { "title": "test", "message": "shit" }, "profile": "pushserver", "user_ids": [ "ac7d1dcd-dd0e-4ee5-8f37-6892bc1d1edc" ] } }, "meta": { "status": 201, "request_id": "96f8552f-b368-43ac-86af-fd505992d4bc", "version": "2.0.0-beta.0" } }

But notification not work, don’t receive. And in plateform ( the list of Push Notifications don’t change.
If i test get information:
Content-Type application/json
Authorization Bearer {token}

{ "data": [], "meta": { "status": 200, "request_id": "bd221755-e0ea-4590-b618-cee3458f2bf0", "version": "2.0.0-beta.0" } }

data is empty !!! Why ?

Help me please. Thank you very much.
Sorry for my bad english.

Ok ! My notification work only if send a tokens in my request.
How send a notification all tokens ?

Include all tokens. IIRC you can’t mass send to all devices.

What ? @@
But platform can send a notification to all devices ! I’have test, it’s work !
How to do with the API ? :’(

1 Like

I have to save the tokens of each device in a db ? For all included in request . That is not very practical. :confused:

Can you show your code for migraton use?

have you found a solution to this issue ?
Last entry in the table is: send_to_all

1 Like

works like a charm :sweat_smile:

1 Like