I need to use admin actions from an external script, currently i post username and password of the admin with every task , validate them, and then do the task.

Is there a way to use an authentication token instead?

that is post the token, and validate it in the external script

or even is there any way on how to validate the access token in a custom module?


The "Magento way" of doing something like this would be to use the REST API (which has token based authentication).

Here's a list of the existing API end points: http://devdocs.magento.com/guides/v2.1/rest/list.html

To add an API for your own admin actions (which is what you need if I understand you correctly), follow this guide:


| improve this answer | |

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.