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:
curl -F "client_secret=<CLIENT_SECRET>" \
-F "client_id=<CLIENT_ID>" \
-F "grant_type=client_credentials" \
-F "scope=delivery" \
https://login.uber.com/oauth/v2/token
Here is how I wrote it in PHP
$cl = curl_init("https://login.uber.com/oauth/v2/token");
curl_setopt($cl,CURLOPT_POST,["client_secret"=>"********"]);
curl_setopt($cl,CURLOPT_POST,["client_id"=>"**********"]);
curl_setopt($cl,CURLOPT_POST,["grant_type"=>"client_credentials"]);
curl_setopt($cl,CURLOPT_POST,["scope"=>"delivery"]);
$content = curl_exec($cl);
curl_close($cl);
var_dump($content);