I am integrating google drive files docs,spreadsheets and preasentations with my app. I need some help about alternate link.
Files.get api includes a link called “alternateLink” which opens users file with compatible editor. But when i forward user to link if user is not logged in, google shows login screen before. I am asking about how can i overcome with login screen using OAuth2 mechanizm. Should i set a cookie or smt else ?
Thanks
The AlternateLink will always require that the user is signed-in his Google Account. If you want to use this you will have to share the document publicly which won’t require sign-in then.
To use OAuth 2.0 you will have to use the ‘downloadUrl’ you can append the OAuth 2.0 access token to the downloadUrl like this:
Beware that the download URL expires after 24h.