Using add-on to authorize current document to 3rd party app

26 views
Skip to first unread message

Troy Christmas

unread,
Jul 31, 2019, 5:56:03 PM7/31/19
to Google Apps Script Community
For some reason, couldn't find a clear answer searching the docs, so here I am.

Goal.  Use Google add-on to enable user to authorize my separate web app to access the user's Google Docs in the future via the drive.file scope.

I've seen how to grant the apps script/add-on access, but not sure how to do this to give my separate web app access.

  • Can I do this with the Drive service or Advanced drive service?
  • Can I use urlfetch?

Any details, examples, resources would be extremely helpful.

Daniel Florey

unread,
Aug 1, 2019, 4:55:12 AM8/1/19
to google-apps-sc...@googlegroups.com
I doubt that this is possible. You'll have to create / open the file with the app that will later access it using the drive.file scope.
When authorizing the file with you add-on the clientId / clientSecret is different and as such it will not work to send the authorization to a different app.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/893c9486-f0f1-46b1-b1e6-27f0a9b03ec0%40googlegroups.com.


--
Kind regards,

Daniel Florey




floreysoft GmbH
Telemannstraße 22, 20255 Hamburg, Germany
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg
HRB 106613 
Geschäftsführer: Daniel Florey

Troy Christmas

unread,
Aug 1, 2019, 9:34:39 AM8/1/19
to google-apps-sc...@googlegroups.com
Daniel, thanks for your answer. If I am using urlfetch, must I use the client id/secret of the add-on or can I use that of my web app? 


Reply all
Reply to author
Forward
0 new messages