Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import the gapi library for using in a react app? #165

Open
arunkumar413 opened this issue Aug 8, 2023 · 1 comment
Open

How to import the gapi library for using in a react app? #165

arunkumar413 opened this issue Aug 8, 2023 · 1 comment
Assignees

Comments

@arunkumar413
Copy link

Summary

Hi Team,

I was referring this doc https://github.com/googleworkspace/browser-samples/blob/main/sheets/quickstart/index.html but it doesn't contain the information on how to include/import the gapi library.

@arunkumar413
Copy link
Author

Also the documentation isn't clear on various scopes available. How do mention the scopes if I want to create and write some data to a spreadsheet.

 ` const SCOPES = 'https://www.googleapis.com/auth/spreadsheets.readonly';`

In the below snippet is the callback a string or a function?

     function gisLoaded() {
        tokenClient = google.accounts.oauth2.initTokenClient({
          client_id: CLIENT_ID,
          scope: SCOPES,
          callback: '', // defined later
        });
        gisInited = true;
        maybeEnableButtons();
      }

Is there a detailed documentation on the methods and variables available in the two libraries referred here?

   <script async defer src="https://apis.google.com/js/api.js" onload="gapiLoaded()"></script>
    <script async defer src="https://accounts.google.com/gsi/client" onload="gisLoaded()"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants