Skip to content
Advertisement

Why do I keep getting unsupported_grant_type when using oAuth2 and curl?

I am trying to authenticate my self with uber rush api, and I keep getting an unsupported_grant_type error message. I am not sure what am I doing wrong here. Any help would be really appreciated. Below is the code I am using

Here is what the command line request looks like:

JavaScript

Here is how I wrote it in PHP

JavaScript

Advertisement

Answer

This is not how to add POST data to cURL. There is PHP documentation to tell you what these options actually mean. Try this instead:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement