尝试按别名过滤时请求错误


{
  "notification": {
    "alert": "Rich Broadcast"
  },
 "message": {
    "title": "Rich Title",
    "body": "<html>The Body</html>",
    "content_type": "text/html"
  },
  "audience": "all",
  "device_types": "all"
}

工作正常,但是当我尝试按别名过滤时,我收到一个错误的请求:

{
  "notification": {
    "alert": "Just one"
  },
  "message": {
    "title": "The title, device registered to 1234567890 only",
    "body": "<html>The body</html>",
    "content_type": "text/html"
  },
  "audience": {
    "alias": "01b307acba4f54f55aafc33bb06bbbf6ca803e9a"
  },
  "device_types": "all"
}

给出错误的请求:

System.Net.WebException: 远程服务器返回错误: (400) 错误请求。

任何人都可以发布一些有效的 json 吗?

如果您要发送富推送,API 将以 400 响应,但您不会将device_types限制为与富推送兼容的平台。这些不兼容的平台包括 wns、mpns 和 blackberry。

{
  "notification": {
    "alert": "Just one"
  },
  "message": {
    "title": "The title, device registered to 1234567890 only",
    "body": "<html>The body</html>",
    "content_type": "text/html"
  },
  "audience": {
    "alias": "01b307acba4f54f55aafc33bb06bbbf6ca803e9a"
  },
  "device_types": ["ios","android"]
}

相关内容

最新更新