Google drive API access - php-7

This is a general question regarding Google drive API system.
I need to create a web app that shows only files hosted in Google drive.
What I've found on the web is mainly regarding authorizing API access to client's account. I need to set only ONE account that is the origin of my files.
How you could suggest to move into this issue?
Thank you

Related

Can we use existing google calendar api in multiple domain?

Hope you are doing well..!!
I have a question , I have an existing website where already integrated google calendar api . Now I have another new website so my question here is , may I use existing website google calendar api in this new domain or not ?
or need to buy for new domain again ?
Thanks,
Anks
If you have a website that users Google calendar api. So you have created a project on Google cloud console. either with service account credentials or web credentials. That is considered to be a single application.
When you go and create a new website and which to also use an api you should create a new project on Google cloud console for this application. The main reason for this would be quota. If you use the same project on google cloud console then both websites would be sharing the quota.
I cant tell you if you need to buy a new domain name for your website i guess that would depend upon your needs. If by domain you mean google workspace domain. Assuming you are using service accounts to store the web app calendar data, i dont see any reason it couldn't be under the same workspace domain. Just make sure you create separate projects in google cloud console to avoid the quota issue i mentioned.

Using Google Sheets in Saas Application

In our SAAS application, we decided to use Google Sheets API, to generate docs and to give permission for editing documents online in Google Docs web and mobile application.
Here, do we need all of our customers have to be Google Accounts? Is there a better way to create users at the backend of our customers to connect directly from our app?
Unless you're using a service account (which isn't ideal for scaling apps), you ought to use google login, which requires a google account.

Google drive oauth api without having to have the user create an app in the Console?

Google Drive API question,
I am writing an application that can view a users' Google Drive files and folders from their google account (can be individual or part of an enterprise).
So on my Google Drive enterprise, I have created an API application. So I have an API key and Secret key stored in my application.
Now I want to use OAuth to authenticate the user so that they can approve my application to read their files. The users will not be part of my enterprise. They can be individual Google accounts, or they can be a single user from an some other enterprise account.
Is this possible? Or are there technical/security reasons this is not allowed?
I just got off the phone with wonderful Google api support agent, and I have my answer:
Yes this is possible to do. however due to the recent phishing attack, Google has put in place new security features that affect the following APIs:
Google drive
Gmail
Contacts
Directory Admin SDK
Here are the new rules:
There is a new security form we will need to fill out and be approved before we will be able to be approved as a trusted app that is able to access these api's using OAuth2 authentication.
Google has provided a feature that many enterprises use that allows an enterprise to completely disable the ability to access these api's using oauth2. So even though we have been approved from step1, we may still get an error for some enterprises who have directly blocked this; however, they can white list us in order to allow it from our enterprise if admin's prefer, while still blocking general use for others.
See links:
https://support.google.com/a/answer/7281227
https://developers.google.com/drive/v3/web/about-auth
https://developers.google.com/identity/protocols/OAuth2
https://www.reddit.com/r/google/comments/692cr4/new_google_docs_phishing_scam_almost_undetectable/

one drive vs one drive for buisness graph api and login endpoint

is there a one login end point for one drive and one drive for business, like https://login.windows.net used for one drive for business, is there any similar end point for both. 2) does graph API support accessing files in one drive , i know it support for one drive for business.
i have tried using graph API for one drive but that didn't not work.
Yes, there is a converged auth flow that supports getting tokens for users in the commercial and consumer service, it is called v2.0 auth endpoint. To use it you need to register your app in https://apps.dev.microsoft.com and follow the instructions here: https://graph.microsoft.io/en-us/docs/authorization/converged_auth. Then your app would be able to use the Microsoft Graph to access both OneDrive and OneDrive for Business, as well as Outlook.com and Office365 Exchange functionality.

Which Google API's can be accessed using the access-token obtained using Google Service Account

Referring to the document https://developers.google.com/accounts/docs/OAuth2ServiceAccount, was able to obtain an access-token.The above mentioned document doesn't provide any details regarding the API's that can be accessed using Service Account.Can anyone list the API's which can be accessed using access-token obtained from Google service account?
Unfortunately, we don't have an exhaustive list of the support in this area. In general, you should be able to access a Google API if that API does not require the user to do something in a web interface to configure their account before doing API access. Service Accounts can't log in. So if the service needs some interactive input from a user on a Google wesite, often their APIs will not work with Service Accounts. Hope this helps.