From fde08e622796e6d11eb71301c3860247a6e21b37 Mon Sep 17 00:00:00 2001 From: Felix Holmgren Date: Mon, 7 Oct 2019 16:31:09 +0200 Subject: [PATCH] Guides (API): Authorization => X-Spree-Token --- api/openapi/authentication.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/openapi/authentication.md b/api/openapi/authentication.md index fdd4503e77d..4ae9674a279 100644 --- a/api/openapi/authentication.md +++ b/api/openapi/authentication.md @@ -10,6 +10,14 @@ You can use your API key to access all resources in the API. The API key must be Authorization: Bearer API_KEY ``` +As an admin, you can find your API token in the admin section under Users > Your e-email > API Access (at `admin/users//edit`) + +Example: + +``` +curl --header "Authorization: Bearer 1a6a9936ad150a2ee345c65331da7a3ccc2de" http://www.my-solidus-site.com/api/stores +``` + By default, API keys are only generated for admins, but you can easily customize Solidus to generate them for all users, which is useful for instance if you want users to be able to sign in and manage their profile via the API. ### Order token @@ -22,4 +30,4 @@ The order token must be passed in the `X-Spree-Order-Token` header in the follow X-Spree-Order-Token: ORDER_TOKEN ``` -If you are already providing an API key, you don't need to also provide the order token (although you may do so). \ No newline at end of file +If you are already providing an API key, you don't need to also provide the order token (although you may do so).