I want to send a notification to users in a city via the remote api in PHP.

Is this a valid createMessage method?

Code on pastebin.com: http://pastebin.com/BGArUNrX

asked 23 May '14, 13:56
uncleho's gravatar image



Our developers recommended to change the "conditions" section with the following line:

'conditions' => json_encode([["City", "EQ", $notification->Country.", ".$notification->City]])

As for the rest of the request, it looks absolutely fine.

permanent link
answered 26 May '14, 07:21
Dmitry%20%20Dyudeev's gravatar image

Dmitry Dyudeev

Hi Dmitry, thanks for your tip. But in my case it is unnecessary to json_encode the conditions, since I encode the whole request in the pwCall method suggested by your FAQ.

Your tip gave me a 210 error message on your endpoint. I switched back to my version and now it works fine ;-)

(30 May '14, 08:58) uncleho uncleho's gravatar image
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 23 May '14, 13:56

question was seen: 1,385 times

last updated: 30 May '14, 08:58