onesignal API,Postman:找不到app_id

Jus*_*her 4 rest json postman onesignal

在尝试按照 onesignal 文档使用 postman 向 onesignal 发送 POST 请求以发送通知时,在尝试发送时出现以下错误: "app_id not found. You may be missing a Content-Type: application/json header."

我确实有正确的内容类型标头: 由于显而易见的原因删除了 API 密钥的请求标头图片

此外,我相信我的 JSON 在语法上是正确的:

{
    "included_segments": [
        "Subscribed Users"
    ],
    "App_id": "{Removed for obvious reasons}",
    "contents": {
        "en": "This is a message, sent from postman using the onesignal API"
    },
    "headings": {
        "en": "This is a heading"
    },
    "subtitle": {
        "en": "This is a subtitle, it should only appear on iOS devices"
    },
    "ios_badgeType": "SetTo",
    "ios_badgeCount": 1,
    "priority": 10
}
Run Code Online (Sandbox Code Playgroud)

不知道从这里去哪里。

此处的文档:https ://documentation.onesignal.com/docs/using-postman

非常感谢任何和所有的帮助!

谢谢!

Jus*_*her 7

我解决了这个问题,并为将来的人们添加我的解决方案。在我的消息的 json 正文中,我有“App_id”,它想要“app_id”。改变 a 的大小写就可以了。