gpt4 book ai didi

android - 在有限的设置中向应用程序发送推送通知 - 找不到 fake_push_profile Ionic

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:04:33 25 4
gpt4 key购买 nike

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

我有一个设备 ID,并且我已经向 Ionic 注册了一个 API token 。我的浏览器中正在运行该应用程序,并且正在尝试运行

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"

在 bash 控制台中。但是我收到如下错误:

"error": {"link": null, "type": "BadRequest", "message": "Security Profile 'fake_push_profile' not found."}}

最佳答案

得到解决方案。

您需要在您的应用仪表板中创建一个配置文件

导航到:Your app setup Page Online

创建一个配置文件并将其命名为fake_push_profile

在您发送推送的 .sh 文件中,您需要在 profile 键中输入 fake_push_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"

这就是您需要做的全部。

这是我所做的屏幕截图,效果非常好。

我为 iOS 做了这件事。

enter image description here

关于android - 在有限的设置中向应用程序发送推送通知 - 找不到 fake_push_profile Ionic,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37040079/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com