sendPushMessageToUser from php

0 votes



I try to send a push message from a php script running on a server to a user. I send the message below: I use $pushNotificationService->sendPushMessageToUser("username",'{"badge":1,"alert":"game.playnextturnmessage","sound":"default","title":"game.playturnpushtitle"}');

using a known user to send the message to.

I get an error: The Request parameters are invalid.

Which parameter is invalid?


The push message does not show up in the push messages log on the apphq.

Hope you can help me on this.

asked Oct 15, 2014 in App42 Cloud API-BaaS by wouter (34 points)

1 Answer

+1 vote
Best answer

Hello Wouter,

Please change your message json from '{"badge":1,"alert":"game.playnextturnmessage","sound":"default","title":"game.playturnpushtitle"}'


"{'badge':1,'alert':'game.playnextturnmessage','sound':'default','title':'game.playturnpushtitle'}" while sending push message to user.

It will resolve your issue, please check and let us know if it helps.

Himanshu Sharma

answered Oct 16, 2014 by hs00105 (2,005 points)
selected Oct 27, 2014 by wouter
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on