PHP发送信息客户端收不到
PHP通过Rest API发信息,服务器返回是成功,但客户端收不到信息。提交和返回的数据如下:
提交网址:
https://a1.easemob.com/****/****/token
POST数据:
{"grant_type":"client_credentials","client_id":"YXA6Ds19wCU1EeSg1Dm8N-qgWQ","client_secret":"YXA6lRyfNBe04iUoOzVHPUzFfWdSCRA"}
返回结果:
{"access_token":"YWMtmKVkcPLrEeS3-vVIfxS0zAAAAU5Xo_3gurR4uBJ5X0QES0YbfHY1DdxmFec","expires_in":5184000,"application":"0ecd7dc0-2535-11e4-a0d4-39bc37eaa059"}
---------------------------------------
提交网址:
https://a1.easemob.com/****/****/messages
POST数据:
{"target_type":"users","target":,"msg":{"type":"txt","msg":"hello"},"from":"10000","ext":[]}
返回结果:
{ "action" : "post", "application" : "0ecd7dc0-2535-11e4-a0d4-39bc37eaa059", "uri" : "https://a1.easemob.com/yebaim/seeu", "entities" : , "data" : { "10006" : "success" }, "timestamp" : 1430805442354, "duration" : 0, "organization" : "****", "applicationName" : "****" }
---------------------------------------
提交网址:
https://a1.easemob.com/****/****/token
POST数据:
{"grant_type":"client_credentials","client_id":"YXA6Ds19wCU1EeSg1Dm8N-qgWQ","client_secret":"YXA6lRyfNBe04iUoOzVHPUzFfWdSCRA"}
返回结果:
{"access_token":"YWMtmKVkcPLrEeS3-vVIfxS0zAAAAU5Xo_3gurR4uBJ5X0QES0YbfHY1DdxmFec","expires_in":5184000,"application":"0ecd7dc0-2535-11e4-a0d4-39bc37eaa059"}
---------------------------------------
提交网址:
https://a1.easemob.com/****/****/messages
POST数据:
{"target_type":"users","target":,"msg":{"type":"txt","msg":"hello"},"from":"10000","ext":[]}
返回结果:
{ "action" : "post", "application" : "0ecd7dc0-2535-11e4-a0d4-39bc37eaa059", "uri" : "https://a1.easemob.com/yebaim/seeu", "entities" : , "data" : { "10006" : "success" }, "timestamp" : 1430805442354, "duration" : 0, "organization" : "****", "applicationName" : "****" }
---------------------------------------
没有找到相关结果
已邀请:
4 个回复
molong
beyond - imgeek运营
molong
提交网址:
https://a1.easemob.com/****/****/token
POST数据:
{"grant_type":"client_credentials","client_id":"YXA6Ds19wCU1EeSg1Dm8N-qgWQ","client_secret":"YXA6lRyfNBe04iUoOzVHPUzFfWdSCRA"}
返回结果:
{"access_token":"YWMtI1yxRPPEEeSYc1vk9LqDFgAAAU5dLx7V6Pgae7Kb1AYZ-ByWIgFQ1peSNeI","expires_in":5184000,"application":"0ecd7dc0-2535-11e4-a0d4-39bc37eaa059"}
---------------------------------------
提交网址:
https://a1.easemob.com/****/****/messages
POST数据:
{"target_type":"users","target":,"msg":{"type":"cmd","action":"users\/contacts\/request"},"from":"60","ext":{"id":16,"sponsor_id":60,"recipient_id":59,"response_type":0,"request_time":1430720309,"response_time":0}}
返回结果:
{ "action" : "post", "application" : "0ecd7dc0-2535-11e4-a0d4-39bc37eaa059", "uri" : "https://a1.easemob.com/****/****", "entities" : , "data" : { "59" : "success" }, "timestamp" : 1430898446354, "duration" : 5, "organization" : "****", "applicationName" : "****" }
---------------------------------------
beyond - imgeek运营
上面那个发送没问题了吧,透传里面是可以加扩展属性的,我用你写的那个透传格式发给客户端没问题,是不是用户写错了之类的?