curl -X POST -u "<app_key>:<master_secret>" -H "Content-Type: application/json" -H "Accept: application/vnd.urbanairship+json; version=3;" \
--data '{"audience": {"ios_channel": "channel id"}, "notification": {"alert": "Hello!", "badge": "+1"}, "device_types": ["ios"]}' https://go.urbanairship.com/api/push/
If I try above curl command, it will return an error:
{"ok":false,"error":"Could not parse request body.","error_code":40000,"details":{"error":"The key 'badge' is not allowed in this context","path":"notification.badge","location":{"line":1,"column":117}},"operation_id":""}
However if I remove badge parameter, the request can go through. This has same result if I try to add "sound" parameter.
Comments
6 comments