SendPushMessageToUser throws App42BadParameterException, message with quotes

0 votes
Hi
 
  I have a problem sending push message with quotes:
 
string newMsg = @"{""alert"":""Msg text"",""interaldata"":""mytestdata""}";
m_oApp42.BuildPushNotificationService().SendPushMessageToUser(p_sTargetUser, newMsg, new UnityCallBack(p_cbOnSuccess, p_cbOnError));
 
Call my error callback with:
App42BadParameterException: {"httpErrorCode":"400", "appErrorCode":"1400", "message":"Bad Request", "details":"The Request parameters are invalid"}
 
The same code with newMsg="testmsg" works perfect
 
Thanks
asked May 14, 2014 in App42 Cloud API-BaaS by jarias (16 points)

1 Answer

+1 vote

Just use  JSON message like this,

string newMsg = @"{'alert':'Msg text','interaldata':'mytestdata'}";
 
and it'll work.
answered May 15, 2014 by Akshay.Mishra (179 points)
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 support@shephertz.com
...