I am aware about method using admin token

Request type :: GET



Authentication Bearer <Admin token>

But how to Fetch all specific customer's order using Customer token in magento 2 REST API ?

  • You can use integration token or admin token as the acl permission for this is admin or else you can create a new endpoint with customer access. – Sairam Sigirisetty Sep 17 '18 at 19:00
  • Can you please explain how ? Programmatically in answer. – Yann Martel Sep 18 '18 at 5:57

Magento is using resource Magento_Sales::sales because of this we can't access it using Customer's token so for the same we need to override Specific API with

<resource ref="self" />

And using this we can access all orders of specific customer using customer's Token in Magento API.

<route url="/V1/orders" method="GET">
        <service class="Magento\Sales\Api\OrderRepositoryInterface" method="getList"/>
            <resource ref="self" />

Try to follow this blog, you will get all Customer's orders by REST API using the token


  • I am aware about method using admin token – Yann Martel Oct 24 '18 at 9:21
  • I want use customer token – Yann Martel Oct 24 '18 at 9:21

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.