Questions tagged [gapi]

gapi is the JavaScript name for the Google APIs

0
votes
1answer
6 views

JavaScript google gapi spreadsheets.create not setting title, using 'Untitled speadsheet'

When I use the following, the sheet is created, but the title isn't being set. When I use the api explorer, it creates with the right title. Using this documentation: https://developers.google.com/...
0
votes
0answers
16 views

Converting a class based component to hooks (gapi API)

I have this class based component using the gapi (Google Auth) API that renders a button and it works: import React from 'react'; class GoogleAuth extends React.Component { state = { isSignedIn: ...
0
votes
0answers
33 views

Chrome Extension: How to include google gapi library in an extension. (Batch Functionality)

I'm developing a chrome extension that grabs the user's homework from an API and passes it onto the google calendar API. It is currently set up to just create one fetch() request for each assignment. ...
0
votes
1answer
57 views

How can I use the Google API in a chrome extension?

I'm now searching for hours how I can use the Google API in a chrome extension. All I want to do is to parse the contents of a website and insert it as a new event to Google Calender. I got the ...
0
votes
0answers
13 views

How to get shared calendar's owner's user profile

I can access to shared calendars and I would like to get user profile for some calendars that belong to someone else. How is it possible via gapi ? Thanks for your help
1
vote
0answers
19 views

Domain not found issue coming

After successful authentication in google api. i am getting error as 'Domain not found'. not getting how to assign domain for the request. here is my code gapi.load("client:auth2", function () { ...
0
votes
0answers
14 views

How to authenticate with Google API Javascript without popup?

I am using Google Javascript library to create a user in GSuite. It requires authentication but it is opening new popup window to get credentials. how to get authenticate using credentials in code. no ...
0
votes
0answers
14 views

googleAuth.currentUser.get().reloadAuthResponse() return empty object in an new Safari window

In a single page web application, log in with google in one Safari window and then open another Safari window navigating to the same web site. We use reloadAuthResponse to get the login info for the ...
0
votes
0answers
49 views

“Request had insufficient authentication scopes” error for spreadsheet that I am the owner of

When I try and access a public, shared spreadsheet (that I own), I get the following error. But only when I am logged in to my Google account. If I try and access the spreadsheet from an incognito ...
0
votes
0answers
6 views

My question is about how to change the pop up google signin screen language to french?

I need to change the popup window language to french if user taps the sign in with google button. function googleInit() { window.gapi.load('auth2', () => { window.gapi.auth2.init({ client_id: ...
0
votes
0answers
24 views

How to call an api using oauth2 in vue.js

First of all, maybe my knowledge about this topic is not right or good, that's why I am here. I want to use OAuth2 to call a Google API (spreadsheet) using vue.js. Now, I've already get the ...
0
votes
0answers
14 views

Implicit Google API authorization for site using Google Cloud Search

I'm trying to authorize a user to use Google Cloud Search on our company intranet (using company domain). If the user has already authenticated with GSuite, it's as simple as calling gapi.auth2....
7
votes
1answer
192 views

Google Calendar API - Push notifications not working

I'm using the Google Calendar API and am trying to receive push notifications when a calendar event is triggered https://developers.google.com/calendar/v3/push I think everything is setup correctly......
0
votes
1answer
39 views

Google calendar API: Event: watch - Channel id must match [A-Za-z0-9\\-_\\+/=]+

I've gone through this example and got it working: https://developers.google.com/calendar/quickstart/js I now want to watch for changes to events: https://developers.google.com/calendar/v3/...
0
votes
0answers
14 views

Is there a way to capture time on Google Tasks using the Tasks API. New version of google tasks can capture time and create recursive reminders

New version of Google Tasks has a time component on due date and a way to set repetitive tasks. I have added a picture below. Can Google Tasks API be used to capture time? If I use time component ...
0
votes
1answer
43 views

ReferenceError: gapi is not defined

SO i am new at this what i am trying to do is using Angular as Front-end to make a simple button that when clicked asks for user to Authenticate just like any login using gmail example but i keep ...
0
votes
0answers
39 views

Firefox plugin: gapi.client is undefined

I've tried a bunch of suggested solutions from stackoverflow but none works, I suspect it may be something to do with cookies or new versions, so I have to ask at long last: I'm trying to use Google (...
0
votes
0answers
158 views

Google Login “error”: “popup_closed_by_user”

Im using google login in my app and it works perfectly fine but if you click the button and then decide to close it or cancel the popup to cancel the login, I get a pop up that says ' "error": "...
0
votes
1answer
39 views

How to get refresh_token from response_code return by grantOfflineAccess

I am struck on on invalid_grant issue. I refer the gapi doc and implement the flow like as, var authorisationRequestData = { 'client_id': clientId, 'scope': scopes, 'immediate': ...
1
vote
1answer
15 views

Googleapi - gapi not updating $scope object as expected in angularjs

I seem to get odd behavior from gapi.client.drive.files.list where I cannot update the scope from the promise it returns. angular.module('myApp').controller("folder_controller", function($scope, $q, $...
0
votes
0answers
39 views

Import google api fonts in react with “preload” attribute

I am currently trying to import google fonts inside of react using the link tag. If I change the attribute "rel" to "stylesheet" and delete the "as" attribute it works, however using "preload" doesn'...
0
votes
0answers
14 views

Google calender api gives 404 not found on insert event Ionic

I am trying to add event to google calender but on calling addEvent() function I'm getting error response. below are the methods that I'm using to load calender and add event to it. initClient() { ...
0
votes
1answer
131 views

How to connect vue.js with gapi

I have been trying too many things and I am not be able to fix this problem. I'm trying to connect vue.js with gapi in order to use Google Spreadsheet after that. The problem is that I think the api....
1
vote
1answer
41 views

gapi.client.load() is not working in my cordova app's sign in feature

We have an app. It does a lot. But the first thing is to sign in to get the name and picture of the user. And we have problem with it. We have built a website in react and we used 'react-google-login'...
0
votes
0answers
37 views

Check if profile imageUrl is for default image with Google Sign In (e.g. google api, not google plus api)

Is there a way to check if the profile image from google's gapi auth2 is google's default image or a user's image? The answers I've seen for this involved google plus api which is now deprecated and I ...
0
votes
0answers
23 views

Google gapi client initialization issue with g-signin2 button

I have a initClient() function that fails to trigger when I have a class='g-signin2' button on the page. I assume my mistake is blending two different google authentication methods on a single page. ...
0
votes
0answers
32 views

googleAuthService auth.isSignedIn.get() method keep returning false even though i am logged in

I am using gapi for my application login. Sometimes auth.isSignedIn.get() is giving me false even though i am logged in. If i clear my browser cache it's working fine. this.googleAuthService.getAuth(...
0
votes
0answers
45 views

How to make work gapi.auth2.getAuthInstance().isSignedIn.listen() on safari

I am creating ann app which has to be connected to Google API. This is my code to call a function when user is signed in gapi.auth2.getAuthInstance().isSignedIn.listen(function(){ googleConnected();}...
0
votes
0answers
14 views

Sign in user into gapi.auth2 from token retrieved from another computer/session

I need users to be able to go to a different computer (for example: from work to home), and if they're logged in my system (I have my own session management infrastructure), I want to have them ...
0
votes
0answers
97 views

Access YouTube Data API with Angular/Typescript 6 Framework does not return data

I am trying to use the YouTube Data API to get somebodies own channel information after they sign in with their Google Account. I Can load the the YouTube Data API perfectly as well as login the user ...
2
votes
0answers
114 views

Using gapi in chrome extension background script, Invalid cookiePolicy

I'm trying to build a chrome extension which should highlight certain things on the page if they appear in a user's google sheet. When trying to initialize gapi object in the background script, I'm ...
0
votes
0answers
43 views

GOOGLE AUTH Insufficient Permissions after sign in

I have a problem with a gapi code. When I click on a button I send a request to gapi.client.load but it returns an error error: {errors: [{domain: "global", reason: "insufficientPermissions", message:...
0
votes
1answer
39 views

Javascript: Google Calender + gapi: service account

My app makes use of Firebase to log users in, and they have access to a calendar, which is especially created as a single common calendar to add and remove reservations. The app has, so to speak, its ...
-2
votes
1answer
54 views

How to read file from drive using javascript?

So, I have a file stored on my drive and I'm building a web app using javascript that needs to read the file to function. what is the simplest way of doing this? I tried a dozen methods but it always ...
1
vote
0answers
64 views

GAPI authentication via cookie on Firebase hosting

I'm hosting a project on Firebase, but I'm using gapi.auth2 for authentication on the browser. When Safari's tracking prevention feature is turned on, all google.com cookies are deleted at the end of ...
0
votes
0answers
28 views

GAPI login always returns popup_closed_by_user error in private mode of Chrome on iOS

I'm trying to implement "Sign in with Google Account" feature by using gapi. When I test my app in private (incognito) mode of Chrome v71.0.3578.89 on iOS 12.1, it always returns "...
1
vote
1answer
2k views

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 ...
1
vote
1answer
87 views

Trouble using Firebase Auth to access google API via gapi SDK

In my firebase (Angular) app, I'm using firebase authentication to log a user in via their Google Profile. As part of this process, the user gives me permission to access their gmail account (scope '...
1
vote
1answer
39 views

Passing google calendar data from service to component

Array not passing from service to component: In the test() function on the service.ts page, google calendar data is successfully being read and pushed to an array called response. All the data logs. ...
0
votes
0answers
23 views

Google Picker in multiuser account scenario (requires login even if OAuth token is passed into it)

In my app, the same app account (company) can be accessed by multiple users (employees). The company account can be linked with one Google Drive account - so all employees can upload and access ...
1
vote
0answers
43 views

Google Drive Javascript API: get all files recursively and put them in array before calling another function

I want to use the Google Drive Javascript API to get all video files in a specific folder and its subfolders. After the list is generated, I want to call another function to format and display the ...
0
votes
0answers
45 views

Call gapi.auth2.init many times with different client_id

I have a sigle web page (angular6 app) when a user admin can create different google accounts. I use gapi to get a backoffice code with grantOfflineAccess. This need a GoogleAuth instance so I do a ...
-1
votes
1answer
68 views

Upload file to specific google drive account using java

I have an application hosted in heruko, a website. I want the users to be able to put some text in the website(using input text or something), and then I want to take this text, create from it a .txt ...
0
votes
2answers
100 views

Google People API gapi.client.people is undefined

After I init the google people api gapi.client like so: gapi.client.init with object containing the scope, api key, and client id: init_people_api = async () => { await gapi.client....
-1
votes
1answer
37 views

Google API Batch returns 401

Doing two or more requests in one batch at once leads to a 401 for each request. const batch = gapi.client.newBatch(); batch.add(gapi.client.drive.files.list()); batch.add(gapi.client.drive.files....
0
votes
0answers
49 views

How to use gapi-client with electron

I'm trying to use gapi-client with my electron app. It's fine when I'm running the dev server but as soon as I pack things and create an actual application (i.e. accessing from file:// instead of ...
-1
votes
1answer
35 views

Javascript upload file from web page to specific google drive account

I'm developing an web application right now. What I have so far in the app is this: <input type="text" id="textToSendToMyGoogleDrive"/> <button id="upload file to google drive"> Send <...
0
votes
0answers
87 views

Usage of API Keys for authentication with gapi.client.bigquery in a simple frontend web application

I have a simple html and refresh.js (code snippet below) that uses API Key to access google API for BigQuery. But it returns error after query is sent where response = {code: 401, data: Array(1), ...
0
votes
0answers
163 views

Error “Cannot read property 'request' of undefined” in Angular 2+ Project

I'm writing code to upload a text file in Google drive using gapi. I tried using below code. var createTxtFile = function(name,text,parentId,token) { console.log("Inside Code "); var ...
-1
votes
1answer
13 views

pagePathLevel only number GAPI

I have filter 'ga:pagePathLevel1==/post/', And this back me result as i expected /post/125/asdd /post/8784/assd /post/asdasd/asdsd But now i want ot filter result and get url only if pagePath2 is ...