Windows Push Notification Services Token request via ColdFusion -
i trying "access token" wns via coldfusion request "bad request" response. believe have set correctly following instructions here. devices registering uri's backend.
here simple code snippet; (i've hidden secret key of course)
<cfhttp url="https://login.live.com/accesstoken.srf" method="post" result="httpresp"> <cfhttpparam type="header" name="content-type" value="application/x-www-form-urlencoded" /> <cfhttpparam type="url" name="grant_type" value="client_credentials" /> <cfhttpparam type="url" name="client_id" value="ms%2dapp%3a%2f%2fs%2d1%2d15%2d2%2d1197233413%2d3602308102%2d1084427847%2d2188608249%2d1036687727%2d3580410356%2d2392468796" /> <cfhttpparam type="url" name="client_secret" value="************************" /> <cfhttpparam type="url" name="scope" value="notify.windows.com" />
i getting failed response when test url directly via browser. appreciate help.
thank you,
ian.
i think cfhttpparam fields set "url" should set "formfield" based on example on msdn.
<cfhttpparam type="formfield" name="grant_type" value="client_credentials" /> <cfhttpparam type="formfield" name="client_id" value="..." /> <cfhttpparam type="formfield" name="client_secret" value="************************" /> <cfhttpparam type="formfield" name="scope" value="notify.windows.com" />
the example appears put thes in content area (showing raw post) - these form fields of post, not url fields right?
Comments
Post a Comment