Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to login using the magento-api-xmlrpc in Magento 2 but works with the magento 1.9 . #3

Open
Rakeshbk321 opened this issue Mar 26, 2018 · 0 comments

Comments

@Rakeshbk321
Copy link

Hi i'am not able to login , it is giving error response saying as follow.
"{ [Magento Error: An error occurred at login]
original: { message: 'Not Found', name: 'Error' },
name: 'Magento Error',
message: 'An error occurred at login' }"

code i have used for :

let magento = new MagentoObject({
host: result.host,
port: result.port,
path: '/api/xmlrpc/',
login: result.user_name,
pass: result.password
});
magento.login((error, sessionId) => {
if (error) {
console.error("GET:MAGENTO:CANNOT:CONNECT:ERROR:", error);
return callback("Unable to connect to magento admin");
}
magento.changeSession(sessionId);
console.info("GET:MAGENTO:CONNECTION:SUCCESS:INFO:Connection established successfully");
return callback(null, {magentoObject : magento, updateUrl : result.updateUrl, saveOrderUrl : result.saveOrderUrl, accessToken : result.accessToken, sessionId : sessionId});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant