I 403 von Google-API Javascript client.Following Forbidden Fehler bin immer ist mein Code:403 Forbidden Fehler von Google-API Javascript-Client
\t \t gapi.load('client',
\t \t \t function()
\t \t \t {
\t \t \t \t console.log('gapi.client loaded.');
\t \t \t \t var discoveryUrl = 'https://sheets.googleapis.com/$discovery/rest?version=v4';
\t \t \t \t gapi.client.load(discoveryUrl).then(
\t \t \t \t \t \t function()
\t \t \t \t \t \t {
\t \t \t \t \t \t \t console.log('gapi.client.sheets loaded.');
\t \t \t \t \t \t \t gapi.client.init(
\t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t 'apiKey': 'AIzaSyB3U13lLH6ZhtLsdfdfddffdddmFcLbjm71pQ',
\t \t \t \t \t \t \t \t \t 'clientId': '1711234435069-q9mqqpb3vlga7hp55dfddfihh0kn9t.apps.googleusercontent.com',
\t \t \t \t \t \t \t \t \t 'scope': 'https://www.googleapis.com/auth/spreadsheets',
\t \t \t \t \t \t \t \t }
\t \t \t \t \t \t \t).then(
\t \t \t \t \t \t \t \t function()
\t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t return gapi.client.sheets.spreadsheets.get(
\t \t \t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t \t \t 'spreadsheetId': spreadsheetId,
\t \t \t \t \t \t \t \t \t \t }
\t \t \t \t \t \t \t \t \t)
\t \t \t \t \t \t \t \t } \t \t
\t \t \t \t \t \t \t).then(
\t \t \t \t \t \t \t \t function(response)
\t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t console.log(response);
\t \t \t \t \t \t \t \t },
\t \t \t \t \t \t \t \t function(response)
\t \t \t \t \t \t \t \t {
\t \t \t \t \t \t \t \t \t console.log(response);
\t \t \t \t \t \t \t \t }
\t \t \t \t \t \t \t);
\t \t \t \t \t \t }
\t \t \t \t);
\t \t \t }
\t \t);
Meine Anwendung wird in Servlet-Container und oauth2 läuft wird auf der Serverseite behandelt. Wenn ich authToken hinzufügen möchte, wie kann ich es tun?