1

Can someone explain to me why I need Oauth to query a list of products for a guest?

I don't understand, I just want a JSON of the product properties for my JavaScript, why do I need this Oauth procedure when dealing with the Rest API?

Or should I just echo out the models contents in json_encode() and do it that way?

Thank you

asked Jan 11, 2017 at 2:10

1 Answer 1

1

In Magento 1, the REST API is only made for OAuth clients, and as you noticed this does not make sense for your use case. A useful general REST API was introduced in Magento 2.

Instead, there is XML-RPC and SOAP and you can implement JSON-RPC on your own with very little effort (see: How to access the Magento API from native client with JavaScript)

Or should I just echo out the models contents in json_encode() and do it that way?

If that's a possible alternative for you, you don't need the API and I would recommend to do it like that.

answered Jan 11, 2017 at 7:22

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.