AnsweredAssumed Answered

Uncaught exception 'Zend_Oauth_Exception'

Question asked by guilhem guilhem on Jun 24, 2014
Latest reply on Dec 17, 2015 by Tevfik Tümer
Hello everyone i want to log in via Oauth from a drupal to my Sugar.
Im using this code :

$oauth = new OAuth('test', 'test', OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);$oauth->disableSSLChecks();
$oauth->enableDebug();
$url = 'http://localhost/unat-extranet/html/service/v4/rest.php';
$request_token_info = $oauth->getRequestToken($url."?method=oauth_request_token");
var_dump($oauth);
return $request_token_info;

And i get an errror:

Fatal error: Uncaught exception 'Zend_Oauth_Exception' with message 'Missing parameter: oauth_token' in C:\UwAmp\www\unat-extranet\html\Zend\Oauth\Provider.php:183 Stack trace: #0 C:\UwAmp\www\unat-extranet\html\Zend\Oauth\Provider.php(303): Zend_Oauth_Provider->checkRequiredParams(Array) #1 C:\UwAmp\www\unat-extranet\html\include\SugarOAuthServer.php(172): Zend_Oauth_Provider->checkOAuthRequest(NULL, Array) #2 C:\UwAmp\www\unat-extranet\html\service\v4\SugarWebServiceImplv4.php(614): SugarOAuthServer->__construct('http://localhos...') #3 C:\UwAmp\www\unat-extranet\html\service\core\REST\SugarRest.php(83): SugarWebServiceImplv4->oauth_request_token() #4 C:\UwAmp\www\unat-extranet\html\service\core\SugarRestService.php(130): SugarRest->serve() #5 C:\UwAmp\www\unat-extranet\html\service\core\webservice.php(63): SugarRestService->serve() #6 C:\UwAmp\www\unat-extranet\html\service\v4\rest.php(50): require_once('C:\UwAmp\www\un...') #7 {main} thrown in C:\UwAmp\www\unat-extranet\html\Zend\Oauth\Provider.php on line 183

Anyone know how to Solve this ?



Outcomes