I trying implement REST API client for appboy according to this documentation: Appboy API documentation
I sent request with json object, that you can see below, and have recieve response with an error.
What i do wrong?
JSON object:
{
"app_group_id":"GROUP_ID",
"external_user_ids":null,
"segment_id":"SEGMENT_ID",
"campaign_id":null,
"override_messaging_limits":false,
"recipient_subscription_state":"all",
"schedule":{"time":"2016-09-07T09:00","in_local_time":true,"at_optimal_time":false},
"messages":{
"apple_push":{
"badge":1,
"alert":{"body":"Auditor-in-ChargennAuditor in Charge is for managers.....","title":"Upcoming Event","title_loc_key":null,"title_loc_args":null,"action_loc_key":null,"loc_key":null,"loc_args":null},
"sound":null,
"extra":{"test_sender":"NASBA","test_subject":"Upcoming Event","test_category":"Events"},
"content-available":true,
"category":"messages",
"expiry":null,
"custom_uri":null,
"message_variation_id":null
},
"android_push":{
"alert":"Auditor-in-ChargennAuditor in Charge is for managers.....",
"title":"Upcoming Event",
"extra":null,
"message_variation_id":null,
"priority":0,
"send_to_sync":false,
"collapse_key":null,
"sound":"default",
"custom_uri":null,
"summary_text":"NASBA|Events",
"delay_while_idle":false,
"time_to_live":0,
"notification_id":0,
"push_icon_image_url":null,
"accent_color":0
},
"windows_push":{
"push_type":"toast_text_02",
"toast_text1":"fgjdgfjhtf",
"message_variation_id":null
},
"windows8_push":{
"push_type":"toast",
"toast_title":"fgjrttrfjtej",
"toast_content":"kjtykdty ghjgfhkghk",
"toast_navigation_uri":"myapp://main",
"toast_hash":{"test_sender":"NASBA","test_subject":"Upcoming Event","test_category":"Events"},
"message_variation_id":null
},
"kindle_push":{
"alert":"dfhdfhdf",
"title":"fghth",
"message_variation_id":null
},
"web_push":{
"alert":"fjrtjdrt",
"title":"ksfgjrtj",
"message_variation_id":null
},
"in_app_message":{
"type":"SLIDEUP",
"message":"gkdjrtdyjrty",
"slide_from":"BOTTOM",
"message_close":"SWIPE",
"message_variation_id":null
},
"email":{
"app_id":"APP_ID",
"from":"Display Name <[email protected]>",
"body":"<html></html>",
"message_variation_id":null
},
"webhook":{
"url":"https://test.com",
"request_method":"GET",
"message_variation_id":null
}
}
}
Response:
{
"message": "Invalid windows phone 8 push type cannot be blank"
}
For your "windows" "push_type" field, that must be "toast" or not present (Windows Phone 8's MPNS doesn't have the templates for push like WNS does)