2014-02-21 4 views
0
{ 
    "notification": { 
    "alert": "Rich Broadcast" 
    }, 
"message": { 
    "title": "Rich Title", 
    "body": "<html>The Body</html>", 
    "content_type": "text/html" 
    }, 
    "audience": "all", 
    "device_types": "all" 
} 

는 잘 작동하지만 내가 별칭으로 필터링 할 때 나는 나쁜 요청 얻을 :잘못된 요청은

System.Net.WebException: The remote server returned an error: (400) Bad Request.

:

{ 
    "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" 
} 

나쁜 요청을 제공합니다을 누구든지 작동하는 json 게시 할 수 있습니까?

답변

0

리치 푸시를 보내고 있지만 리치 푸시와 호환되는 플랫폼으로 device_type을 제한하지 않으면 API가 400으로 응답합니다. 이러한 호환되지 않는 플랫폼에는 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"] 
}