Amit Singh
Amit Singh

Reputation: 1

Uber Api Authentication giving error in Client id Can not open file ???/

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

Answers (1)

iandayman
iandayman

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

Related Questions