magento-client-php
magento-client-php copied to clipboard
How do you get the OAuth token?
As I understand it Magento uses three-legged OAuth 1.0a (source: http://devdocs.magento.com/guides/m1x/api/rest/introduction.html#RESTAPIIntroduction-CreateasimpleproductasanAdminuserwithOAuthauthentication). In three-legged OAuth 1.0a you start with a key / secret and get the token from the service (http://oauthbible.com/#oauth-10a-three-legged). How do you get the token using this library? Are you supposed to write something to get the token before you use this library?
+1
+1
Hello,
I've the same problem. $callbackUrl = "https://xxxx/order/api/list";
// connect with key and secret
$client = $this->magentoRestClient::factory(array(
'base_url' => 'http://xxxx.local',
'consumer_key' => '123456789012345678901234567890',
'consumer_secret' => '123456789012345678901234567890',
'callback' => $callbackUrl,
));
// Get token and token_secret
$requestToken = $client->getRequestToken();
// Get url to authorize the token
$adminAuthUrl = $requestToken->getAuthUrl('/admin/oauth_authorize');
But after that i dont know what to do ... Do you have resolv this ?
Kind regards