O
O
Oleg2016-08-26 14:27:21
OAuth
Oleg, 2016-08-26 14:27:21

Google oauth2. Error getting token with grand_type=password. How to get it using login and password?

I want to get a token to be able to use google api using login and password. There is a python program with authentication via oauth2client.tools.run_flow(). I'm trying curl:
curl -i -H 'Content-Type: application/x-www-form-urlencoded' -X POST ' https://accounts.google.com/o/outh2/token ' -d 'client_id=* *********&client_secret=********************&grant_type=password&username=*****&password=*****&scope= https:// www.googleapis.com/auth/drive '
To which I get the answer:
"error" : "invalid_request",
"error_description" : "Invalid grant_type: PASSWORD"
Has anyone else experienced this? Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question