AnsweredAssumed Answered

Uncaught exception 'Zend_Oauth_Exception' with message 'Missing parameter oauth_token in /Zend/Oauth/Provider.php:183

Question asked by Mohamed Musammil on Sep 25, 2014
Latest reply on Nov 17, 2016 by Divya Priya Rajendran
I am writing a REST Client script in PHP to retrieve the my Sugar CRM data using the Oauth authentication.  Below is my client script. I Got the
 "Uncaught exception 'Zend_Oauth_Exception' with message 'Missing parameter oauth_token in /Zend/Oauth/Provider.php:183" error and "PHP Fatal error:  Uncaught exception 'OAuthException' with message 'Invalid auth/bad request"

While executing my script.

Please suggest me to fix this issue.


Script:

$oauth = new OAuth('xxxxxxxxxxxxxxx', 'yyyyyyyy', OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);

$url = 'http://{mywebsite}/mycrm/service/v4_1/rest.php';
$request_token_info = $oauth->getRequestToken($url."?method=oauth_request_token");
print_r($request_token_info);

where xxxxxxxxxxx, yyyyyyyy are the some random key I created in Sugar CRM admin ( Oauth setting).

Awaiting for the response

Outcomes