1

I tried to use Magento rest api using oauth signature or token-based, but it's a nightmare.

I followed this guide: http://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-oauth.html

This other one: http://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-token.html

But, I can retrieve is this message

{
 message: "Client is not authorized to access resources",
 parameters: "Magento_Catalog::products" 
}

Even if I have admin access.

I tried to activate an integration with callback and identity link but it always says: "Failed to send the necessary data due to an unexpected error"

I' m using a node.js app and I'm trying to retrieve products, but nothing seems to work, I actually don't have an identity link, what does it mean " application login's page " ? I don't have an application login page.

Any help would be appreciated.

Dhiren Vasoya
9,70914 gold badges37 silver badges61 bronze badges
asked Feb 1, 2018 at 16:42

1 Answer 1

0

I had the same problem, as you said is a nightmare. But I found a great application who helped me to fix this problem. The name is POSTMAN. With this app I just create this lines of code that I hope will help you.

var request = require("request");
var options = { method: 'GET',
 url: 'http://www.yourlink.com/index.php/rest/V1/modules',
 headers: 
 { 'Postman-Token': 'YOUR TOKEN',
 'Cache-Control': 'no-cache',
 'User-Agent': 'Mozilla/4.0 (compatible)',
 'Content-Type': 'application/json' } };
request(options, function (error, response, body) {
 if (error) throw new Error(error);
 console.log(body);
});
answered Feb 1, 2018 at 17:19

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.