cancel
Showing results for 
Search instead for 
Did you mean: 

REST API issue

REST API issue

I'm trying to run the demo: "Retrieve the list of products as a Customer user with OAuth authentication" provided on the magento REST API introduction page: www.magentocommerce.com/api/rest/introduction.html

 

after I run the php code from above page in a browser, it always redirect to the web store, and shows the login page, asking for Log in to use restuser, what is the correct way to provide the user login logic in the code without need to login on the web page again? 

1 REPLY

Re: REST API issue

I tried to test REST API with the REST Client plugin for the Mozilla Firefox browser, following the instructions provided on the page:

http://www.magentocommerce.com/api/rest/testing_rest_resources.html

 

even the authorization failed:

 

URL: http://my-domain.com/oauth/initiate

method: get

header:

OAuth oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_nonce="08UH6H1AT9o10Px", oauth_timestamp="1431250883", oauth_consumer_key="bac99b0ad9839ea965d82902ee3d4e97", oauth_signature="i0HFYFeCgq2K0yLmj8bP3HSwgS8%3D"

 

response: 

oauth_problem=parameter_absent&oauth_parameters_absent=oauth_callback

is callback URL mandatory for the request? 

 

after I manually added the callback URL in the header, it just return with following error:

 

oauth_problem=nonce_used