diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index f6e41e681d..da98f41bb2 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -18648,17 +18648,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 + + + + ``` scheme: bearer cookie_auth: type: apiKey diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index f6e41e681d..da98f41bb2 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -18648,17 +18648,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 + + + + ``` scheme: bearer cookie_auth: type: apiKey diff --git a/docs/api/admin/openapi.yaml b/docs/api/admin/openapi.yaml index 5492810a7e..4c2251095a 100644 --- a/docs/api/admin/openapi.yaml +++ b/docs/api/admin/openapi.yaml @@ -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 + + + + ``` scheme: bearer cookie_auth: type: apiKey