Authorizing Your App with Google Drive
All requests to the Google Drive API must be authorized by an authenticated user. Google Drive uses the OAuth 2.0 protocol for authenticating a Google account and authorizing access to user data. You can also use OAuth 2.0 or Google+ Sign-in to provide a "sign-in with Google" authentication method for your app.
Why use Google for authentication?
Providing OAuth 2.0 user authentication directly or using Google+ Sign-in reduces your development overhead. It also provides a trusted, secure, login system that's familiar to users, consistent across devices, and removes the burden of users having to remember another user name and password.
How authorization works
At a high-level, all apps follow the same basic authorization pattern:
- Register the application in the Google Developers Console.
- Request that the user grant access to data in their Google account.
- If the user consents, your application requests and receives credentials to access the Drive API.
- Refresh the credentials (if necessary).
To get started, select your development platform: