【发布时间】:2017-02-10 11:31:01
【问题描述】:
我需要谷歌驱动器上的 oAuth2。但我无法获得令牌。哪些参数是错误的? Google 文档 API 无法帮助我了解问题所在。 我确实获取请求。
const options = {
method: 'post',
client_id: '{EXAMPLE}deajshot.apps.googleusercontent.com',
redirect_uri: 'https://drive.google.com/open?id={EXAMPLE}',
scope: 'https://www.googleapis.com/auth/drive.metadata',
prompt: 'none',
mode: 'no-cors',
response_type: 'token'
};
fetch('https://accounts.google.com/o/oauth2/auth',options)
.then(function (response) {
console.log(response);
})
现在我有错误 - 400。这是一个错误。
错误:invalid_request
缺少必需的参数:response_type;
【问题讨论】: