chore(docs): Updated API Reference (#3107)
* chore(docs): Generated API Reference * small fix Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0312eceda7
commit
4e82ec0734
@@ -543,17 +543,30 @@ components:
|
||||
of `{api_token}`. This is where you must pass the API token.
|
||||
|
||||
|
||||
If you're alternatively following along with the JS Client request
|
||||
samples, you must provide the `apiKey` option when creating the Medusa
|
||||
client:
|
||||
If you're following along with the JS Client request samples, you must
|
||||
provide the `apiKey` option when creating the Medusa client:
|
||||
|
||||
|
||||
```js
|
||||
```ts
|
||||
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3,
|
||||
apiKey: '{api_token}' })
|
||||
|
||||
```
|
||||
|
||||
|
||||
If you're using Medusa React, you can pass the `apiKey` prop to
|
||||
`MedusaProvider`:
|
||||
|
||||
|
||||
```tsx
|
||||
|
||||
<MedusaProvider
|
||||
apiKey='{api_token}'
|
||||
//...
|
||||
>
|
||||
|
||||
```
|
||||
scheme: bearer
|
||||
cookie_auth:
|
||||
type: apiKey
|
||||
|
||||
Reference in New Issue
Block a user