Youtube Analytics API:缺少必需参数:grant_type

时间:2014-04-24 19:32:05

标签: oauth youtube youtube-api youtube-analytics oauth2-playground

我正在使用谷歌提供的OAuth游乐场。虽然我的调用中有grant_type参数,但它无法识别它。为了继续调用API,我需要刷新令牌;然而,即使在操场上,电话也无法正常工作。

POST /o/oauth2/token?client_id=##########.apps.googleusercontent.com&client_secret=##########&refresh_token=##########-###########&grant_type=refresh_token 

HTTP/1.1
Host: accounts.google.com

Content-length: 0

Content-type: application/json

Authorization: Bearer ya29.1.AADtN_WMOMyvBKs_HomU60xaG1kJM2hUKFz1i7oVbCnGI-Bouk9VEqMDFJ1VbFA

HTTP/1.1 400 Bad Request

Alternate-protocol: 443:quic

Content-length: 102

X-xss-protection: 1; mode=block

X-content-type-options: nosniff

Content-disposition: attachment; filename="json.txt"; filename*=UTF-8''json.txt

Expires: Fri, 01 Jan 1990 00:00:00 GMT

X-google-cache-control: remote-fetch

Server: GSE

Via: HTTP/1.1 GWA

Pragma: no-cache

Cache-control: no-cache, no-store, max-age=0, must-revalidate

Date: Thu, 24 Apr 2014 19:16:45 GMT

X-frame-options: SAMEORIGIN

Content-type: application/json; charset=utf-8

-content-encoding: gzip

{

"error_description": "Required parameter is missing: grant_type", 

"error": "invalid_request"

}

0 个答案:

没有答案