Forum Discussion

bbarui's avatar
5 years ago

Authentication problem

 
Hi,
I am getting following response when I am trying authorize my app  and it is not going through. 
 
image.png
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
 
 
 
 
 
 
 
 
 
 
 
 
 
  • Hi bbarui 

     

    Thank you for your post.

     

    Can you please clarify the name of the app you are using and whether it is being used on the phone or desktop. Also, does it happen after you have entered the email address and password for login or at further stages of authentication?

     

    Once I have this information, I would be able to have a look into this for you.