0

我尝试根据此文档为 appboy 实现 REST API 客户端: Appboy API 文档

我发送了带有 json 对象的请求,您可以在下面看到,并收到带有错误的响应。

我做错了什么?

JSON对象:

{
  "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@address.com>",
          "body":"<html></html>",
          "message_variation_id":null
      },
      "webhook":{
          "url":"https://test.com",
          "request_method":"GET",
          "message_variation_id":null
      }
  }
}

回复:

{
"message": "Invalid windows phone 8 push type cannot be blank"
}
4

1 回答 1

0

对于您的“windows”“push_type”字段,它必须是“toast”或不存在(Windows Phone 8 的 MPNS 没有 WNS 那样的推送模板)

于 2016-11-24T01:06:56.163 回答