How to use Customer JSON Web Token



Hi, I’m using the customer authentication which returns me the customer_id and a JSON web token which the documentation says I should use “to make implicit requests for other endpoints”. I don’t seem to find some examples showing how to use this token when making endpoint requests. Can someone show me some examples?


Hey Bica :wave:

You can use the customer JWT to retrieve orders, customer details and customer addresses.

Are you using one of our SDK libraries, or making direct API calls?


Thanks for the answer. I’m making direct api calls.


You need to pass the customer JWT with the headers of the request, along with the access_token from authenticating with the API.

To retrieve all orders for a specific customer:

curl -X GET \
  -H "Authorization: Bearer XXXX"
  -H "X-Moltin-Customer-Token: XXXX"

To retrieve a single order for a specific customer:

curl -X GET \
  -H "Authorization: Bearer XXXX"
  -H "X-Moltin-Customer-Token: XXXX"

How to get list of orders for a single customer

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.