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:
- User installs G Suite Add-on.
- Provides access to sheets and other services...
- Launches Add-on and opens the sidebar.
- Set parameters for data insertion and run process.
- App Script sends a request for my api with user parameters from the sidebar.
- 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.