Closed gabbsmo closed 3 years ago
OAuth Client JSON is indeed supported by oauth2l, so I'm puzzled as to why you are seeing the error. What version of oauth2l are you using? Have you tried the linux or mac os version of the binaries?
Btw, I tried this on the latest windows binary, but could not repro the issue - it prompts for an auth code as expected. Can you try using https://storage.googleapis.com/oauth2l/latest/windows_amd64.tgz and let me know how it goes? Thanks!
One other possibility is that your client_secret json is in an unsupported format. It should have something like ""redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}" in it. When generating the client_secret json, you can try using "Desktop" as the application type (not all application types are supported by oauth2l for 3-legged OAuth route.)
Thanks @andyrzhao! Generating a Desktop OAuth client did the trick.
I have created an app in the Google Cloud Console and downloaded the OAuth client JSON file. oauth2l complains that the key has no type field. While searching I found that some users got around this by using a service account instead but service accounts are not supported by the Photos API. README says that --credentials can be a OAuth client.