5 years ago
Authentication problem
Hi, I am getting following response when I am trying authorize my app and it is not going through. The php code I am using is also pasted below <?php $clientID = '{API Key}'; $url = urlencode("https://{mysite}/myob/callback.php"); $ch = curl_init(); $customHeaders = array( 'Content-Type: application/x-www-form-urlencoded' ); curl_setopt($ch, CURLOPT_HTTPHEADER, $customHeaders); curl_setopt($ch, CURLOPT_URL, "https://secure.myob.com/oauth2/Account/Login?client_id=". $clientID ."redirect_uri=". $url ."&response_type=code&scope=la.global"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $data = curl_exec($ch); echo $data; ?> Please let me know what I am doing wrong. Thank you Bhaska Barui |