hello

i want to send a notification to only one device related to a specific action like "some one like your post", and i can't do this thought the api the only response i got is "CODE_NOT_AVAILABLE" and i don't want to turn on the debug mode,i want to send a specific notification to a specific device.

and what if i want to send the notification to only 4 devices?

this is my code

$notification = Notification::create(); $notification = $notification->setDevices(['317bd234b303337e751173eab974049f']); $notification = $notification->setContent('test 22'); $request = CreateMessageRequest::create() ->addNotification($notification);

asked 20 Aug '15, 15:46
vodo's gravatar image

vodo
113

Hi! Please note that "CODE_NOT_AVAILABLE" message appears only when you are sending notifications to less then 10 devices using targeting via "devices" parameter of /createMessage method. Please do not worry about it — the notifications are sent anyway, but the information about them isn't saved in your "Push History".

The Debug Mode overrides this behaviour for one hour and lets you save all pushes in the Push History, so you could make sure they are successfully sent.

Alternatively, if you would like to have all your notifications stored in history, you can use our Tags feature for targeting.

permanent link
answered 21 Aug '15, 11:17
Benedict's gravatar image

Benedict
7127

edited 21 Aug '15, 11:17

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×120
×111
×3

question asked: 20 Aug '15, 15:46

question was seen: 2,222 times

last updated: 21 Aug '15, 11:17