0

Is it possible to authorize a user in the G Suite Add-on, and then use its token on my API service to work with Sheets Client Libraries. I have a Client ID and Client Secret from Google OAuth for my web application, and Google authorization is also connected on my web app. And now I want to develop an Add-on for google sheets that will communicate with my api.

For example:

  1. User installs G Suite Add-on.
  2. Provides access to sheets and other services...
  3. Launches Add-on and opens the sidebar.
  4. Set parameters for data insertion and run process.
  5. App Script sends a request for my api with user parameters from the sidebar.
  6. Api retrieves data from the database and writes it to the table using Sheets Client Libraries.

How to correctly configure user authorization in the G Suite Add-on for use the Client ID and Client Secret of my api and user token received from the G Suite Add-on for use Sheets Client Libraries on my api service?

If this is not possible, please tell me how to correctly implement this logic for the G Suite Add-on. Thank.

  • 1
    What have you tried so far? Can you show your code? – Rafa Guillermo Jun 24 '20 at 11:24
  • @RafaGuillermo I think that my code doesn’t matter here, I’m trying to understand how to configure Google services for publish my add-on to the G Suite market. So that after installing the add-on, get a user token from apps script, which then can be used with my secret and client Id from my api to access the table. – Aleksandr Jun 24 '20 at 11:48
  • And is this even possible? – Aleksandr Jun 24 '20 at 11:59
  • Does this answer your question? [Calling a Google Apps Script web app with access token](https://stackoverflow.com/questions/29229361/calling-a-google-apps-script-web-app-with-access-token) – Kos Jun 24 '20 at 18:00

0 Answers0