Trying to get AccessToken using curl but getting error as "https://accounts.google.com/o/oauth2/token: No such file or directory" Can someone help what i am doing wrong?
Mainly, am wondering if I am setting up the client secret correctly, though I'm quite unsure, would really appreciate some guidance.
(have redacted some part by *)
curl \
—request POST \
--data ”code=4/***********************3Uzp--0jT4uNN******rSWSRkHw8&client_id=***************************.apps.googleusercontent.com&client_secret=**********&redirect_uri=https://localhost&grant_type=authorization_code” \https://accounts.google.com/o/oauth2/token
This is the code i use.
Code ripped from one of my gists GoogleAuthenticationCurl.sh
update
after the removal of OOB
urn:ietf:wg:oauth:2.0:oob
should be changed tohttp://127.0.0.1
look in the url bar the code will be there but you will see a 404 error on the page itself.