odeke-em / drive

Google Drive client for the commandline
Apache License 2.0
6.68k stars 426 forks source link

how do I setup my own Google Drive API client app and keys #952

Open rihani opened 7 years ago

rihani commented 7 years ago

after install, i run the following line drive init ~/GoogleDrive, however once i open the link i am greeted with the following door, any idea how to sort out. thanks i am signed in google and have created OAuth 2.0 client ID on the developer page

400. That’s an error.

Error: invalid_scope

Some requested scopes were invalid. {invalid=[https://www.googleapis.com/a]}

Learn more

Request Details
access_type=offline
client_id=354790962074-7rrlnuanmamgg1i4feed12dpuq871bvd.apps.googleusercontent.com
redirect_uri=urn:ietf:wg:oauth:2.0:oob
response_type=code
scope=https://www.googleapis.com/a
That’s all we know.
odeke-em commented 6 years ago

Thank you @rihani for the question and welcome to drive! My apologies for the late reply, I've been swamped with a bunch of work.

So without much context, I'd recommend taking a look at https://developers.google.com/drive/v2/web/about-auth and that scope that you have in your error looks invalid a. On that page they have the various listed scopes that you can use and drive uses the Drive scope https://github.com/odeke-em/drive/blob/08ef171674e04babd8da74e52aa9fa9aebefbf1f/src/remote.go#L1206.