发送通知时,Engagespot API返回无效的标识符

问题描述 投票:0回答:1

我正在尝试使用PHP和Engagespot创建一对一的用户通知系统。用户已登录,我调用了Engagespot.identifyUser()函数。之后如果我向此标识符发送通知,则表示无效标识符。

这是我的API调用。

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"]   
}

知道为什么这不起作用吗?

php web push
1个回答
0
投票

您需要确保标识符存在。如果尚未执行Engagespot.identifyUser('daniel'),则不会映射标识符,并且API将抛出此错误。

解决方案是确保正确执行Engagespot.identifyUser('daniel')

© www.soinside.com 2019 - 2024. All rights reserved.