正如官方文档中提到的,我正在使用请求构建的确切顺序:
POST /accesstoken.srf HTTP/1.1
Host: login.live.com
grant_type: client_credentials
client_id:/here's my client id from dashboard/
client_secret: /here's my secret from dashboard/
scope: notify.windows.com
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
我得到:
400 错误请求
Cache-Control → no-store
Connection → close
Content-Length → 76
Content-Type → application/json
Date → Fri, 01 Apr 2016 11:23:08 GMT
Pragma → no-cache
Server → Microsoft-IIS/8.5
X-Content-Type-Options → nosniff
X-WLID-Error → 0x8004101C
{
"error": "invalid_request",
"error_description": "Invalid request parameters"
}
我正在使用在线请求生成器,不得不提一下,2 天前它运行良好,我收到了预期的令牌和到期时间。
我在商店中创建了一个新应用程序来尝试新的 client_id 和 client_secret 仍然存在同样的问题,也尝试从具有不同外部 IP 的其他 PC 上尝试但没有成功。WNS 是通常的 Windows 糟糕服务还是我遗漏了什么?