Windows Push Notification
After reading through the documentations again and again ( just look at it, so much text, so much pain! ) after a whole f**king hour. I finally figured out how does this work.
Since it was so frustrating I am making a note here. Hope someone finds useful.
It doesn't matter whether your server auth with the WNS or the device requested a channel URI from WNS first. Either way, both of them are required in order to send the notification.
1. You need the channel URI from your client that your server pushes to.
2. You need the token auth by the WNS to push notification to that channel URI.
Notice there are both `token` in POST and GET request body. Do not be confused by them like I was.
* The token in POST body is the one your server authenticated with the WNS.
* The token in the GET query string is just comes with it so just POST with the entire URI and you will be good.
===
Just why would Microsoft have to make this ridiculously complex? I just want to be able to send my goddamn notification. Why would you make it so hard? There is even a certification thing that if you don't upload you f**king cert, your ability to send notifications are limited.
Since it was so frustrating I am making a note here. Hope someone finds useful.
It doesn't matter whether your server auth with the WNS or the device requested a channel URI from WNS first. Either way, both of them are required in order to send the notification.
1. You need the channel URI from your client that your server pushes to.
2. You need the token auth by the WNS to push notification to that channel URI.
Notice there are both `token` in POST and GET request body. Do not be confused by them like I was.
* The token in POST body is the one your server authenticated with the WNS.
* The token in the GET query string is just comes with it so just POST with the entire URI and you will be good.
===
Just why would Microsoft have to make this ridiculously complex? I just want to be able to send my goddamn notification. Why would you make it so hard? There is even a certification thing that if you don't upload you f**king cert, your ability to send notifications are limited.
Wed Feb 10 2016 23:56:49 GMT+0000 (Coordinated Universal Time)
Last modified: Sun Apr 10 2022 12:41:45 GMT+0000 (Coordinated Universal Time)
Comments
No comments here.
Do you even comment?
website:
Not a valid website
Invalid email format
Please enter your email
*Name:
Please enter a name
Submit
抱歉,Google Recaptcha 服務被牆掉了,所以不能回覆了