chore(docs): Generated API Reference (#5259)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
22130ecb63
commit
68915bee86
@@ -0,0 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.store.auth.getToken({
|
||||
email: 'user@example.com',
|
||||
password: 'supersecret'
|
||||
})
|
||||
.then(({ accessToken }) => {
|
||||
console.log(accessToken);
|
||||
});
|
||||
@@ -1,2 +1,2 @@
|
||||
curl '{backend_url}/store/product-categories' \
|
||||
-H 'Authorization: Bearer {api_token}'
|
||||
-H 'x-medusa-access-token: {api_token}'
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
curl '{backend_url}/store/product-categories/{id}' \
|
||||
-H 'Authorization: Bearer {api_token}'
|
||||
-H 'x-medusa-access-token: {api_token}'
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
curl --location --request POST 'https://medusa-url.com/store/auth/token' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"email": "user@example.com",
|
||||
"password": "supersecret"
|
||||
}'
|
||||
Reference in New Issue
Block a user