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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.