0
votes

I would like to upload a file from my PC with curl to my google drive (language c). So after a lot of posts and docs, I created a google account where I defined an project using Drive API. I'm trying to get an authorization code using my Client_ID.

curl -v -k "https://accounts.google.com/o/oauth2/auth" -d "client_id=myclientId.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/drive.file&response_type=code&redirect_uri=https://drive.google.com"

and the response is 400 Bad Request What should I do?

1

1 Answers

0
votes

redirect_uri is set up in the in your Google API project. It should be the file that you the Authentication is returned to. I don't think that &redirect_uri=https://drive.google.com is correct.