在有限的设置中向应用发送推送通知 - 找不到离子的fake_push_profile

Jos*_*ill 5 android push-notification ionic-framework

我已按照说明在本文中为推送通知设置了有限的设置:http://docs.ionic.io/v2.0.0-beta/docs/push-limited-setup

我有一个设备ID,我已经注册了Ionic的API令牌.我的应用程序在我的浏览器中运行,我正在尝试运行

curl -X POST -H "Authorization: Bearer API_TOKEN" -H "Content-Type: application/json" -d '{
    "tokens": ["DEV_DEVICE_TOKEN"],
    "profile": "fake_push_profile",
    "notification": {
        "message": "Hello World!"
    }
}' "https://api.ionic.io/push/notifications"
Run Code Online (Sandbox Code Playgroud)

在bash控制台中.但是我收到的错误看起来像这样:

"error": {"link": null, "type": "BadRequest", "message": "Security Profile 'fake_push_profile' not found."}}
Run Code Online (Sandbox Code Playgroud)

Dal*_*vik 11

得到了解决方案.

您需要Profileapp仪表板中创建一个.

导航至:您的应用设置在线页面

创建配置文件并为其命名fake_push_profile.

在您的.sh文件从您在您的发送推送你需要输入fake_push_profile你的profile关键:

 curl -X POST -H "Authorization: Bearer Your_Token" -H "Content-Type: application/json" -d '{
"tokens": ["Device_Token"],
"profile": "fake_push_profile",
"notification": {
    "message": "Hello World!"
}
 }' "https://api.ionic.io/push/notifications"
Run Code Online (Sandbox Code Playgroud)

这就是你需要做的.

这是我做过的截图,它就像一个魅力.

我这样做了iOS.

在此输入图像描述