glotlabs / gdrive

Google Drive CLI Client
MIT License
1.53k stars 91 forks source link

Error 400: redirect_uri_mismatch when creating credentials #109

Open hamon-e opened 8 months ago

hamon-e commented 8 months ago

I had to add the URL http://127.0.0.1:8085 to the oauth configuration Authorized redirect URIs otherwise I had the error Error 400: redirect_uri_mismatch

I think it should be added to that documentation https://github.com/glotlabs/gdrive/blob/main/docs/create_google_api_credentials.md

Thanks

Btw why not using a service account instead? it would be much easier

mtrojanowski commented 8 months ago

I think you did not change the application type to Desktop. The desktop application does not require configuring a redirect URI. It should accept any localhost redirect URI.

As for the service accounts — you have to log in as a Google user and authorize the app to access your Google Drive. Would this behavior be possible with service accounts? I haven't checked this, but I think that won't be possible.

AstrobioMike commented 3 months ago

heya, @hamon-e, I think I'm having the same issue ending at a 127.0.01 refused to connect when trying to set up the account (i did set the application type to Desktop App). Can you tell me where I can access the Authorized redirect URIs to be able to add http://127.0.0.1:8085?