1 /**
2 * @oas [post] /auth/token/refresh
3 * operationId: PostTokenRefresh
4 * summary: Create Token
5 * description: Create a token.
6 * x-authenticated: false
7 * x-codeSamples:
8 * - lang: JavaScript
9 * label: JS SDK
10 * source: |-
11 * import Medusa from "@medusajs/js-sdk"
12 *
13 * export const sdk = new Medusa({
14 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
15 * debug: import.meta.env.DEV,
16 * auth: {
17 * type: "session",
18 * },
19 * })
20 *
21 * const token = await sdk.auth.refresh()
22 *
23 * // all subsequent requests will use the token in the header
24 * const { customer } = await sdk.store.customer.retrieve()
25 * - lang: Shell
26 * label: cURL
27 * source: curl -X POST '{backend_url}/auth/token/refresh'
28 * tags:
29 * - Token
30 * responses:
31 * "200":
32 * description: OK
33 * "400":
34 * $ref: "#/components/responses/400_error"
35 * "401":
36 * $ref: "#/components/responses/unauthorized"
37 * "404":
38 * $ref: "#/components/responses/not_found_error"
39 * "409":
40 * $ref: "#/components/responses/invalid_state_error"
41 * "422":
42 * $ref: "#/components/responses/invalid_request_error"
43 * "500":
44 * $ref: "#/components/responses/500_error"
45 *
46 */
47