chubaka Posted August 16, 2017 Share Posted August 16, 2017 Hello. Regarding https://docs.whmcs.com/WHMCS_Single_Sign-On_Developer_Guide 1. The application requests an access token by sending its credentials to the OAuth Token API Endpoint $post_data = Array( 'code' => $code, 'client_id' => $client_id, 'client_secret' => $client_secret, 'redirect_uri' => $redirect_uri, 'grant_type' => 'authorization_code', //'grant_type' => 'single_sign_on', ); $curl = curl_init($whmcs_token_url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data); $result = json_decode(curl_exec($curl)); curl_close($curl); var_dump($result); die(); Where to get $code? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.