我已经编写了一个Perl脚本,并且我尝试使用 OneSignal 发送测试推送通知。这是我的 JSON (为了便于阅读而美化);
{
"contents": {
"en": "Here are your daily picks!"
},
"app_id": "id_here",
"app_ids": ["id_here"],
"include_player_ids": ["aabaa581-b54a-4348-81cb-00ed65c1adf8"]
}
我收到一条错误消息,用纯HTML格式显示:
<p id="message" class="text">An Unexpected Error Occurred</p>
<p id="submessage" class="text">Error Code: 500</p>
<p id="explanation" class="text">
We track these errors automatically, but if the problem persists feel free to contact us.
</p>
关于我做错了什么的任何想法?
答案 0 :(得分:2)
AND
app_ids`参数。文档有点误导:
https://documentation.onesignal.com/reference#create-notification
如果您只是使用app_id
,那么它会发送罚款:)