Skip to content

Commit

Permalink
Guides (API): Authorization => X-Spree-Token
Browse files Browse the repository at this point in the history
  • Loading branch information
felixyz committed Nov 29, 2019
1 parent 3f2223b commit fde08e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api/openapi/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<user_id>/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
Expand All @@ -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).
If you are already providing an API key, you don't need to also provide the order token (although you may do so).

0 comments on commit fde08e6

Please sign in to comment.