1

I am working on Rest API. I faced problems with the admin token. We are using an admin token with admin user name and password and then generated token use for admin-related API access. Can you please suggest me alternative way to access the token, because admin credentials for while disabled then the whole admin-related API is not working?

Can you please help me with what I'm using for the admin token alternative way?

1 Answer 1

1

Rather than using an admin token for fetching data, you should prefer using an integration token as not affected by admin user status and it does not expire in 4hour as an admin token

https://devdocs.magento.com/guides/v2.4/get-started/authentication/gs-authentication-token.html

If you still prefer/ or have to use admin token , you can create a fallback integration token that you can use when the admin token fails

4
  • 1
    Thank you so much! It's working well.
    – Joy
    Dec 13, 2021 at 7:06
  • If I want to use REST API Token, so how do get it. only pass static token or else?
    – Joy
    Dec 13, 2021 at 7:55
  • Yes only pass token and make sure the API you are calling should be assigned to that token in admin Dec 13, 2021 at 9:25
  • okay, but I get the "Access Token" field dynamic from the backend.?
    – Joy
    Dec 13, 2021 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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