I want to set up a file store for my club, and I need to grant read-only access to members via our website. For lack of being able to integrate Google Drive on our website in an iframe, I picture the following scenario for granting member access:
- The user, while logged in to our club website, hits a button that reads 'Grant access to Google Drive folder".
- Some server-side PHP code calls the Permissions API authenticated as my Google service account, requesting that the folder be shared with the current user's e-mail address.
- The user receives a notification mail from Google that he uses to access the folder.
Can this be done? It would seem so from reading https://developers.google.com/drive/service-accounts. Would I simply need to hard code the authorization code of my service account and then be able to count on it not changing? Or do I need more?
Thanks in advance.