I have followed the instructions to setup a limited setup for push notifications at this article: http://docs.ionic.io/v2.0.0-beta/docs/push-limited-setup
I've got a device ID, and I've registered an API token with Ionic. I have the app running in my browser and am attempting to run
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"
In a bash console. However I'm getting an error that looks like this:
"error": {"link": null, "type": "BadRequest", "message": "Security Profile 'fake_push_profile' not found."}}
Got the solution.
You need to create a Profile
in your app
Dashboard.
Navigate to : Your app setup Page Online
Create a profile and Name it fake_push_profile
.
In your .sh
file from your where your are sending push you need to enter fake_push_profile
in your profile
key:
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"
That's all you need to do.
Here is the screenshot what I did and it works like a charm.
I did it for iOS
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With