Ich brauche oAuth2 auf Google Drive. Aber ich kann kein Token bekommen. Welche Parameter sind falsch? Das Google-Dokumentations-API kann mir nicht helfen, zu verstehen, was falsch ist. Ich hole Anfrage.Ich verstehe Google Drive oAuth 2.0
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);
})
Jetzt habe ich Fehler - 400. Das ist ein Fehler.
Fehler: invalid_request
Erforderliche Parameter fehlt: response_type;