@clayd123 wrote:
I have push running flawlessly for Android, but when I try to run the exact same curl command I'm using for Android with an iOS token, notifications don't go through and when I check the message status I see:
{"error": {"message": "Attempted to connect to the API via HTTP, but HTTPS is required.", "link": null, "type": "ProtocolError"}, "meta": {"version": "2.0.0-beta.0", "status": 400, "request_id": "3bfbfad0-12b8-44a5-ab5e-3ca3dde120a8"}}
What gives? I have my certificate uploaded, I followed the tutorials step by step and it is working on Android. Any ideas how to fix this?
This is the curl command I'm using to test:
curl -X POST -H "Authorization: Bearer my_api_token" -H "Content-Type: application/json" -d '{
"tokens": ["device_token"],
"profile": "first_try",
"notification": {
"message": "Alert!"
}
}' "https://api.ionic.io/push/notifications"
Posts: 3
Participants: 2