Apache Cordova Android Push Notification Aerogear Unable To Send

397 Views Asked by At

While using

curl -3 -u \ "f07c43a6-bb0a-4bb7-a1eb-a368db272212:e2cf19c3-6636-4712-bbe8-26b7c1ac9c09" \ -v -H "Accept: application/json" -H "Content-type: application/json" \ -X POST -d '{"message": {"alert":"Hello AeroGear", "badge":1}}' \ https://aerogear-html5.rhcloud.com/rest/sender

to push notification I am getting 401 unauthorised request.Unable to figure out how to authenticate?

2

There are 2 best solutions below

0
On

Going to this link https://aerogear-html5.rhcloud.com, produces a website not available

Is there a specific tutorial you used to get that curl command?

0
On

Make sure your authorization parameters(through -u) are valid and also make sure you are using the correct credential for the service you are trying to access.

Also, if you are from windows(for linux its ok) then wrap the post parameters with double quotes(") Instead of single(').

-d "{\"message\": {\"alert\":\"Hello AeroGear\", \"badge\":1}}"