Attempting to make an authentication call to the API and keep getting http code 400 w/ error message
http code 400 w/ error message
error: unsupported_grant_type
error_description: grant type not supported
I'm making the call with php code below
$server = curl_init($this->api_token_url);
curl_setopt($server, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($server, CURLOPT_POST, 1);
$parms = array('grant_type' => 'password',
'client_id' => $this->client_id,
'client_secret' => $this->api_key,
'username' => $this->username,
'password' => $this->password . $this->security_token);
curl_setopt($server, CURLOPT_POSTFIELDS, $parms);
curl_setopt($server, CURLOPT_RETURNTRANSFER, 1);
$data = json_decode(curl_exec($server), true);
Thanks for the help!
답변 1개
Hi Rob,
I recommend that you post this question on the dev boards. This will increase your chances of getting an answer for this type of questions.
http://boards.developerforce.com/sforce/?category.id=developers