Reputation: 1
i am referring UBER documentation here
curl -F 'client_id=<xxxxxxxxxxpIH0lKS-oDYy-FPVABjn>' \
> -F 'client_secret=<xxxxxxxxxxxxxpADzzeDLo2BYJ_pLS>' \
> -F 'grant_type=authorization_code' \
> -F 'redirect_uri=<http://localhost>' \
> -F 'code=<cxxxxxxxxxxxx8LpsNViR2ua0CP9g#_>' \
> https://login.uber.com/oauth/v2/token
Error in: curl: (26) couldn't open file "xxxxxxxxxxxxxpIH0lKS-oDYy-FPVABjn>"
Upvotes: 0
Views: 59
Reputation: 4467
I imagine it's a syntactical thing. It looks like you are sending the chevron characters in the values?
So client id should be
client_id=xxxxxxxxxxpIH0lKS-oDYy-FPVABjn
not
client_id=<xxxxxxxxxxpIH0lKS-oDYy-FPVABjn>.
That will likely cause the "26" error code.
Make sure you removing the <
and >
from the form values.
something like this will work.
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -F "client_id=xxxxxxxxxxpIH0lKS-oDYy-FPVABjn&client_secret=xxxxxxxxxxxxxpADzzeDLo2BYJ_pLS&grant_type=authorization_code&redirect_uri=http://localhost&code=cxxxxxxxxxxxx8LpsNViR2ua0CP9g#_" "https://login.uber.com/oauth/v2/token"
Replacing the 'xxxxx's with the real values.
Upvotes: 1