4

I want to create my own custom REST API in my magento site. I am new in magento api. I have followed following tutorial to learn to put authentication for particular consumer added in magento rest consumer

  1. http://inchoo.net/magento/configure-magento-rest-and-oauth-settings/
  2. http://inchoo.net/magento/consuming-magento-rest-zend_oauth_consumer/

I have sat all the settings in REST-Oauth consumers,REST-Roles,REST-Attributes and user permission as per 1st tutorial

also added controller which should return be login screen as mentioned in tutorial 2

It says magento.loc/restconnect/test link will redirect you some login screen

when i fire my local controller url : localhost/offer/restconnect/test/

it redirects me in following which gives 404 not found : localhost/offer/admin/oAuth_authorize?oauth_token=47dc6c43fdc972879a761ad1370318e2

Anyone have any idea at which point i am getting wrong or which things i am missing to do. I have used correct consumerKey and consumerSecret in TestController

Thanks :)

asked Feb 23, 2016 at 4:38

1 Answer 1

2

Issue solved! Got API authentication server login screen successfully. Problem was in my value authorizeurl set in $param array in TestController. I have changed it to 'authorizeUrl'=>'localhost/offer/admin/oauth_authorize' from 'authorizeUrl'=>'localhost/offer/admin/oAuth_authorize'. small 'a' letter solved the issue. :)

answered Feb 23, 2016 at 7:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.