The client credentials are invalid
function Box_Integration_getAccess($code)
{
$access_token_url = "https://api.box.com/oauth2/token";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $access_token_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'grant_type'=>'authorization_code',
'code'=>''.$code.'',
'client_id'=>'img6v9bjmroh620mwmu2577x2pzxhwm7ss',
'client_secret'=>'REDACTED'
]));
curl_setopt($ch,CURLOPT_HTTPHEADER, array(
"Content-Type application/x-www-form-urlencoded"
));
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
Please sign in to leave a comment.
Comments
0 comments