Skip to main content
Rob Cardenas (Feedzai) 님이 #Data Management에 질문했습니다
Attempting to make an authentication call to the API and keep getting

 

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개
0/9000