Questions tagged [google-api-js-client]

This code is written by Google, this compact and efficient client library provides access to any of Google's RESTful APIs

Google APIs Client Library for JavaScript

Description

Written by Google, this compact and efficient client library provides access to any of Google's RESTful APIs. See below for a list of supported APIs.

Beta

This library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), our intention is to deprecate and provide ample time for developers to update their code.

Features

The JavaScript client library supports these Google APIs.

The JavaScript client supports the following browser environments:

  • Chrome 8+
  • Firefox 3.5+
  • MSIE 8+
  • Safari 4+

The library supports the following authentication and authorization methods - OAuth2

Documentation

Links

637 questions
7
votes
1 answer

bug in google drive SDK JS api (TypeError: Cannot read property 'sl' of undefined)

A few weeks ago we started noticing strange errors from the google client API or google drive JS api (not sure which, the URL reference is below), they have increased in frequency over the last few days TypeError: Cannot read property 'sl' of…
6
votes
2 answers

Using Firebase Auth & gAPI?

How do I get Firebase Auth to work with Google drive api? Using react, I have firebase auth working and google drive (gapi) both working individually but am struggling to merge the two. With Firebase 9, it's been made easier to access Google API:…
InquisitiveTom
  • 423
  • 3
  • 13
6
votes
0 answers

How to take fs.createWriteStream and upload it to Gapi google drive api create function?

I have a chrome extension that takes file information from a backend node.js server in order to serve google drive files up within the extension. What I am having trouble with in this specific instance is uploading a file saved on the backend to a…
6
votes
2 answers

Google Login gives "This browser or app may not be secure"

I am testing my local app on https://localhost:44367/ using Chrome for google login. My app is Angular 6 using .Net core When i try to login using my credentials, it gives Error saying Couldn't sign you in This browser or app may not be secure. Try…
Ted Lee
  • 61
  • 1
  • 2
6
votes
3 answers

the source list for content security policy directive 'script-src' contains an invalid source in safari angular 5

I have implemented google-recapthca in angular 5 and it working well for all browers but in safari i got following error: the source list for content security policy directive 'script-src' contains an invalid source: "strict-dynamic". It will be…
Manoj Rana
  • 3,068
  • 1
  • 24
  • 34
6
votes
1 answer

how to stub Google gapi global variable in component tests using Karma

I'm trying to setup tests in my angular 4 project for a service that uses Google gapi. The problem I have is that the variable is declared globally but not mocked, therefore when I run the tests I get the following error: ReferenceError: gapi is…
6
votes
0 answers

Using Google auth2 sign in, force user to enter password

I just implemented Google JavaScript sign-in button to our homepage, and everything works the way it suppose to, but thats sometimes bad.. So the thing is that our users use our application on the same computer, 3-4 different users per day. Having a…
inubs
  • 478
  • 2
  • 15
6
votes
1 answer

Google Plus API error gapi.loaded_0

I am trying to use requireJS with Google plus API, but getting an error when I click login button Here is the error and screenshot: GET…
Aryan
  • 133
  • 2
  • 9
6
votes
2 answers

gapi login state not retained in users browser after page refresh

I've dove into a small project aiming to utilize the YouTube API. I've got some basic code in place, that I initially thought was, working properly. Using Chrome, I can login through multiple machines on my own network without any issues using the…
6
votes
1 answer

Make google auth request gapi.auth without a popup

Need to make auth request in js but the browser does not support popups. Is there any way to redirect to a new url or show the request in the in html5 page of the application
250
  • 581
  • 5
  • 17
6
votes
1 answer

Javascript: Cannot assign to read only property '_epoch' of false

I have a method to process the response from my google javascript client (gapi): var processResponse = function(response) { result._state = 'loaded'; response._epoch = (new Date()).getTime(); ... A few…
Rusty Rob
  • 16,489
  • 8
  • 100
  • 116
6
votes
1 answer

Google signInCallback called twice when user is signed_out

I am using Google Login hybrid flow to authenticate users but I have a strange bug : when users are signed out (authResult['error'] == 'user_signed_out'), the signInCallback is called twice ! It does not happen when the user signs in, so I don't…
6
votes
1 answer

Google authorize popup gets stuck in chrome extension

I am using gapi client in a chrome extension to access Google Drive. First step is to authorize my app. I am using gapi.auth.authorize to start the authorization. After I authorize the app through a popup launched by gapi, the window never closes…
5
votes
3 answers

Persistent Client-Only Google API Authorization?

I'm making a purely client-side web app that displays some information from the user's Google calendar. They go through OAuth, give permission for calendar access, and then see the derived information. Following the Google Calendar JS Quickstart I…
Jeff Kaufman
  • 575
  • 3
  • 13
5
votes
2 answers

Google Oauth popup cancellation callback

When using Google Identity Services (GSI) I can display a popup to ask users to connect with their Google account. This is pretty well documented and it works well with this code: const client = window.google.accounts.oauth2.initCodeClient({ …
1 2
3
42 43