I have an application that will send a Push Notification using the API. The problem I am struggling with is that when I add the "Actions" section I am always getting a "400 Bad Request". I have followed the example I have seen here https://support.urbanairship.com/hc/en-us/community/posts/115017602043-How-to-create-JSON-which-uses-a-Deep-Link-action-for-use-with-PUSH-API . Below is the JSON I am using and I am not sure why adding the "actions" section alone would cause the Bad Request...
The following gets 400 Bad Request
{
"audience": {
"OR": [
{
"ios_channel": "342604eb-a1ff-4347-bfae-11dfe6823d3e"
}
]
},
"device_types": "all",
"notification": {
"alert": "iOS Alert",
"ios": {
"sound": "default",
"actions": {
"open": {
"type": "deep_link",
"content": "orderdetail?patientid=0da4050c-6127-4aed-ad8c-2f6ac5046518"
}
}
}
}
}
This works
{
"audience": {
"OR": [{
"ios_channel": "342604eb-a1ff-4347-bfae-11dfe6823d3e"
}]
},
"device_types": "all",
"notification": {
"alert": "iOS Alert",
"ios": {
"sound": "default"
}
}
}
Any feedback or ideas would be awesome. I have been working on this all day and it can't get it to work.
Thanks in advance.
Comments
2 comments