Note that there are some explanatory texts on larger screens.

plurals
  1. POOauth Error for MAGENTO REST Api
    primarykey
    data
    text
    <p>I Have been working around with the magento's REST API's for the first time and when i execute this API in a test file in different project i get the Following error</p> <p>Fatal error: Class 'OAuth' not found in C:\wamp\www\trunk\test.php on line 15</p> <p>Tried google around even on the stack overflow with lots of topic but nothing could get me passed through this error. In many of blog in found they ask to install Oauth extension for php. as i am using wamp server for windows i could found some extension and i have installed but doesn't show up in the extension list when i run phpinfo(). </p> <p>Looking forward for help. </p> <p>Thanks in Advance.</p> <pre><code>$callbackUrl = "http://localhost/Magento/magento/index.php/oauth_admin.php"; $temporaryCredentialsRequestUrl = "http://localhost/Magento/magento/index.php/oauth/initiate?oauth_callback=" . urlencode($callbackUrl); $adminAuthorizationUrl = 'http://localhost/Magento/magento/index.php/admin/oAuth_authorize'; $accessTokenRequestUrl = 'http://localhost/Magento/magento/index.php/oauth/token'; $apiUrl = 'http://localhost/Magento/magento/index.php/api/rest'; $consumerKey = 'g4gxxknjl3qaof2px0otrpuw6hv4qxsf'; $consumerSecret = '8dc0dfruqresuwvufby7ttchutj3nyn3'; session_start(); if (!isset($_GET['oauth_token']) &amp;&amp; isset($_SESSION['state']) &amp;&amp; $_SESSION['state'] == 1) { $_SESSION['state'] = 0; } try { $authType = ($_SESSION['state'] == 2) ? OAUTH_AUTH_TYPE_AUTHORIZATION : OAUTH_AUTH_TYPE_URI; $oauthClient = new OAuth($consumerKey, $consumerSecret, OAUTH_SIG_METHOD_HMACSHA1, $authType); $oauthClient-&gt;enableDebug(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload