@oscarmari wrote:
Hello!
I have a ionic1 app running well on iOS and Android with push notifications (using ionic platform alpha).
Now I'm trying to migrate it to ionic platform beta but I can't manage to make it work...I've setup a security profile and uploaded the iOS certificate and the Android GCM key. I've also created an API token.
If I run an authentication test everything works as expected:
curl -H "Authorization: Bearer API_TOKEN" https://api.ionic.io/auth/test
{"meta": {"status": 200, "version": "2.0.0-beta.0", "request_id": "a4a73f88-0fc5-4eb1-8eec-908b7eac24a6"}, "data": {"success": "You have successfully made an authenticated request to the Ionic Platform API"}}
When I try to send a notification using the same API TOKEN, the API return "enqueued":
curl -X POST
-H "Authorization: Bearer API_TOKEN"
-H "Content-Type: application/json"
-d '{ "tokens": ["DEVICE_TOKEN"], "profile": "production","notification": {"message": "Hello World!"}}'
https://api.ionic.io/push/notifications{..."state": "enqueued", "status": "open"}
Then, if I check the notification status using its UUID, I get "Authorization header is missing.", but i've used the same header in the first test...
https://api.ionic.io/push/notifications/UUID/messages
{"error": {"link": null, "message": "Authorization header is missing.", "type": "Unauthorized"}, "meta": {"request_id": "9ff94919-d29a-4e6c-89bb-900919d35a14", "status": 401, "version": "2.0.0-beta.0"}}
Any idea what's happening?
Thank you very much!
Posts: 1
Participants: 1