Php 当我发送通知时,Engagespot API返回无效标识符
我正在尝试使用PHP和Engagespot创建一对一用户通知系统。用户已登录,我调用了Engagespot.IdentificationUser()函数。之后,如果我向该标识符发送通知,它将显示无效标识符 这是我的API调用Php 当我发送通知时,Engagespot API返回无效标识符,php,web,push,Php,Web,Push,我正在尝试使用PHP和Engagespot创建一对一用户通知系统。用户已登录,我调用了Engagespot.IdentificationUser()函数。之后,如果我向该标识符发送通知,它将显示无效标识符 这是我的API调用 POST /2/campaigns HTTP/1.1 Host: api.engagespot.co Api-Key: XXX { "campaign_name":"Test Campaign", "notification":{ "title"
POST /2/campaigns HTTP/1.1
Host: api.engagespot.co
Api-Key: XXX
{
"campaign_name":"Test Campaign",
"notification":{
"title":"Hey XYZ, Message only for you.",
"message" : "How are you",
"icon":"http://mywebsite.com/icon.png",
"url":"https://mywebsite.com"
},
"send_to":"identifiers",
"identifiers" : ["daniel"]
}
知道这为什么不起作用吗?您需要确保标识符存在。如果未执行
Engagespot.IdentificationUser('daniel')
,则不会映射标识符,API将抛出此错误
解决方案是确保正确执行Engagespot.identificationuser('daniel')