@ebocic wrote:
Hi,
My name is Esteban and I need your help please.
I am developing an app in ionic for a while and now i am currently implementing notifications.
The problem is that when a test the notifications in debug mode with a CURL request i get the following error:
{"error": {"message": "Invalid Content-Type header value: 'application/x-www-form-urlencoded'. Supported media type(s) are: 'application/json'.", "type": "UnsupportedMediaType", "link": null}, "meta": {"request_id": "f2404220-bcb8-4d46-be20-cb671804b6e8", "version": "2.0.0-beta.0", "status": 415}
the CURL is this:
curl -X POST -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI666666666666666666FjLTRiZGItYjJjMC0yNWE2ZTNmNmE0YzcifQ.64U46Sfw4S9bmqz0GLpqaV-DUHJcGwoOD7oZiAgSfYI" -d '{ "tokens": ["DEV-92fa0230-6359-4ea9-a82f-bb0247a3ea43"], "profile": "fake_push_profile", "notification": { "message": "Hello World!" } }' "https://api.ionic.io/push/notifications"
I tested the connection with the ionics servers with this and everything is ok:
curl -X GET -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJmY666666666666666ZGItYjJjMC0yNWE2ZTNmNmE0YzcifQ.64U46Sfw4S9bmqz0GLpqaV-DUHJcGwoOD7oZiAgSfYI" https://api.ionic.io/auth/test
If you can help me i will be very grateful.
Thanks!
Posts: 3
Participants: 2