Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento Rest API Oauth URL Returning 404

From the Magento wiki at:

http://www.magentocommerce.com/api/rest/authentication/oauth_authentication.html#OAuthAuthentication-OAuthProcess

When getting an API token you start off by getting an Unauthorized Request Token at:

www.mystore.com/oauth/initiate

However, my code does not work and when I browse to the above url in my browser I get a 404.

I am appending shop store code to the base url (eg www.mystore.com/en/) I don't know if this alters anything.

like image 863
Matthew Dolman Avatar asked Jan 23 '13 04:01

Matthew Dolman


2 Answers

The Magento Wiki has a typo:

$adminAuthorizationUrl = 'http://yourhost/admin/oAuth_authorize';

Should be:

$adminAuthorizationUrl = 'http://yourhost/admin/oauth_authorize';
like image 63
pspahn Avatar answered Sep 30 '22 19:09

pspahn


I struggled with this one for most of the day, so here's a late contribution in case it helps anybody:

The authorization URL that's documented by Magento, admin/oauth_authorize, assumes that you're not using a custom URL for your admin access. "admin" is the standard URL to access the Magento dashboard, but many people change it for security. If you have changed your admin URL to something other than "admin", use that instead.

IOW if you access your Magento dashboard at https://yoursite.com/foo, then your authorization URL is foo/oauth_authorize.

like image 25
hsgass Avatar answered Sep 30 '22 17:09

hsgass