Is this possible? I want to make an API call to get orders, add shipment to order, and update product details via an API. Right now it appears that I would need to use the api to login via Oauth every time. I would like to automate syncing this kind of data up without the need to login with a user account.

1 Answer 1


Yes, it is possible. Use the Token based authentication instad of OAuth, which is not the right choice for your use case anyways.

How it works:

  1. Request a token, using username and password (either customer or admin / API user):

    get auth token example

    Admin token:

     POST /V1/integration/admin/token

    Customer token:

     POST /V1/integration/customer/token
  2. Use the returned token in following requests, using the Authorization HTTP header:

     Authorization: Bearer <authentication token>

Source and full documentation: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-token.html

  • Thats so simple, not sure why I didnt catch this. Thanks.
    – dogt
    Oct 10, 2016 at 17:09

Your Answer

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

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