Exchanges either a one-time authorization code (from
GET /apps/oauth/authorize) or a long-lived refresh_token for a fresh
access/refresh token pair. Two grant types are supported:
authorization_code — first-time install flow.
refresh_token — silent token rotation after the 24h access token
expires.
No other grant types are supported. In particular, RFC 8693 token
exchange (urn:ietf:params:oauth:grant-type:token-exchange) is not
available — an App Bridge session token cannot be exchanged for an Admin
API access token. Session tokens authenticate the embedded user to your
own backend; the Admin API access token comes from the
install handoffcode exchanged
here with grant_type=authorization_code.
This endpoint is rate-limited to 10 requests per minute per IP.
Your app’s client secret, sent over TLS. Compared (constant-time) against
the value returned by /apps/credentials. Because the secret doubles as the
HS256 signing key for App Bridge session tokens, it is stored in plaintext
(not hashed) — the host must sign JWTs with the same value your app verifies
with. Treat it as a signing key: never expose it client-side, and rotate it
from the developer dashboard if it leaks.
The server-generated state token from the authorize call. Must match
what was bound to the code server-side or the request fails with
Invalid state parameter.
Required when the authorize call sent a code_challenge. Length 43-128
chars. For S256 flows, the server SHA-256 hashes this and compares
(constant-time) against the stored challenge.
When you refresh, the old refresh token is replaced with a brand new pair
(and its SHA-256 hash is blacklisted for 31 days as a backstop).
Re-using a rotated refresh token returns 401 Invalid refresh token —
the replayed value no longer matches any installation, so the lookup fails
before the blacklist is even consulted. Either way the status is 401;
treat any 401 from the token endpoint as “re-run the install handoff”.
When grant_type=authorization_code would create a brand new active
installation (or re-activate a previously disabled one), the server
checks per-shop function caps before issuing tokens. If the app ships
functions and the merchant already has too many active installs of apps
with the same function types, the endpoint returns:
{ "status": 409, "state": "error", "message": "Cannot install: this store already has 1 active cart_transform function, and the per-shop limit is 1. Uninstall another cart_transform app before installing this one."}
This check is skipped when re-issuing tokens for an already-active
installation (no status flip = no new active install counted).
// Server-side helper — refresh before every API call when expiry is close.async function withFreshToken(installation) { const msLeft = new Date(installation.tokenExpiresAt) - Date.now(); if (msLeft > 60_000) return installation.accessToken; const res = await fetch('https://api.launchmystore.io/apps/oauth/token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ grant_type: 'refresh_token', refresh_token: installation.refreshToken, }), }); const { data } = await res.json(); // Persist the new pair — both old tokens are now blacklisted. await db.installation.update({ accessToken: data.access_token, refreshToken: data.refresh_token, tokenExpiresAt: new Date(Date.now() + data.expires_in * 1000), }); return data.access_token;}
Always send this request server-side. Never expose client_secret
in browser code.
client_secret is always required for grant_type=authorization_code
— PKCE is verified in addition to the secret, not instead of it, so
even PKCE flows must exchange the code server-side.
Successful exchange consumes both the code and its state — both
are deleted atomically.
client_secret verification is brute-force resistant: requests are
throttled by the IP rate limit (10/min) and compared in constant time.
The secret is stored in plaintext (it is also the App Bridge session-token
signing key), so keep it server-side only and rotate it if exposed.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"LaunchMyStore Developers","colors":{"primary":"#3B82F6","light":"#60A5FA","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/tradefusiontechnologiespvtltd/h0D_voj1Mzg300-x/logo/light.svg?fit=max\u0026auto=format\u0026n=h0D_voj1Mzg300-x\u0026q=85\u0026s=22ebdb2605f91ccf72f71097a82d6928","dark":"https://mintcdn.com/tradefusiontechnologiespvtltd/h0D_voj1Mzg300-x/logo/dark.svg?fit=max\u0026auto=format\u0026n=h0D_voj1Mzg300-x\u0026q=85\u0026s=d0bd7a151fcc8504ff88d67bdf086207"},"favicon":"https://mintcdn.com/tradefusiontechnologiespvtltd/GZ5CeZvKFUHoQpDN/favicon.svg?fit=max\u0026auto=format\u0026n=GZ5CeZvKFUHoQpDN\u0026q=85\u0026s=e74621046b0cb57582fc4ce3b5615df7","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.launchmystore.io"}},"navbar":{"links":[{"href":"mailto:support@launchmystore.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.launchmystore.io"}},"footer":{"socials":{"twitter":"https://twitter.com/launchmystore","github":"https://github.com/launchmystore","linkedin":"https://linkedin.com/company/launchmystore"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/launchmystore"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/launchmystore"},{"anchor":"App Store","icon":"grid-2","href":"https://app.launchmystore.io/marketplace"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tradefusiontechnologiespvtltd","hasAudioNarration":false,"actualSubdomain":"tradefusiontechnologiespvtltd","customDomains":["docs.launchmystore.io"],"gitSource":{"type":"github","owner":"launchmystore","repo":"lms-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad5e02b03b76e0d8ece410d","collectionId":"112f590e-f500-486d-a909-11c0921ce922","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad5e02b03b76e0d8ece410d"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad5e02b03b76e0d8ece410d","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":146},{"language":"default","tag":"Documentation","count":64},{"language":"default","tag":"Extensions","count":18},{"language":"default","tag":"Metafields","count":13},{"language":"default","tag":"Theme Development","count":13},{"language":"default","tag":"Functions","count":13},{"language":"default","tag":"Aqua Basics","count":11},{"language":"default","tag":"Get Started","count":11},{"language":"default","tag":"Blogs","count":10},{"language":"default","tag":"App Bridge","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/oauth/token","slug":"/api-reference/oauth/token","pageMetadata":{"title":"Token Exchange","api":"POST https://api.launchmystore.io/apps/oauth/token","description":"Exchange an authorization code or refresh token for an access token","href":"/api-reference/oauth/token"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Exchange an authorization code or refresh token for an access token\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`token-exchange`,children:`Token Exchange`}),`\n`,_jsxs(_components.p,{children:[`Exchanges either a one-time authorization `,_jsx(_components.code,{children:`code`}),` (from\n`,_jsx(_components.code,{children:`GET /apps/oauth/authorize`}),`) or a long-lived `,_jsx(_components.code,{children:`refresh_token`}),` for a fresh\naccess/refresh token pair. Two grant types are supported:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`authorization_code`}),` — first-time install flow.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`refresh_token`}),` — silent token rotation after the 24h access token\nexpires.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`No other grant types are supported. In particular, RFC 8693 token\nexchange (`,_jsx(_components.code,{children:`urn:ietf:params:oauth:grant-type:token-exchange`}),`) is `,_jsx(_components.strong,{children:`not`}),`\navailable — an App Bridge session token cannot be exchanged for an Admin\nAPI access token. Session tokens authenticate the embedded user to your\nown backend; the Admin API access token comes from the\n`,_jsx(_components.a,{href:`/getting-started/install-handoff`,children:`install handoff`}),` `,_jsx(_components.code,{children:`code`}),` exchanged\nhere with `,_jsx(_components.code,{children:`grant_type=authorization_code`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`This endpoint is rate-limited to `,_jsx(_components.strong,{children:`10 requests per minute per IP`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`authorization_code`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.launchmystore.io/apps/oauth/token\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grant_type\": \"authorization_code\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"client_id\": \"lms_app_xxx\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"client_secret\": \"lms_secret_yyy\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"code\": \"9fbb1c3e8d4a7b2e...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"5d6f7c8b9e0d1c2a...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"code_verifier\": \"OPTIONAL_PKCE_VERIFIER\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`refresh_token`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.launchmystore.io/apps/oauth/token\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"grant_type\": \"refresh_token\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"refresh_token\": \"lms_refresh_abc123...\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(Heading,{level:`3`,id:`grant-type-authorization_code`,children:[`Grant type: `,_jsx(_components.code,{children:`authorization_code`})]}),`\n`,_jsx(ParamField,{body:`grant_type`,type:`string`,required:true,id:`param-grant-type`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`authorization_code`}),`.`]})}),`\n`,_jsx(ParamField,{body:`client_id`,type:`string`,required:true,id:`param-client-id`,children:_jsx(_components.p,{children:`Your app’s public client identifier.`})}),`\n`,_jsx(ParamField,{body:`client_secret`,type:`string`,required:true,id:`param-client-secret`,children:_jsxs(_components.p,{children:[`Your app’s client secret, sent over TLS. Compared (constant-time) against\nthe value returned by `,_jsx(_components.code,{children:`/apps/credentials`}),`. Because the secret doubles as the\nHS256 signing key for App Bridge session tokens, it is stored `,_jsx(_components.strong,{children:`in plaintext`}),`\n(not hashed) — the host must sign JWTs with the same value your app verifies\nwith. Treat it as a signing key: never expose it client-side, and rotate it\nfrom the developer dashboard if it leaks.`]})}),`\n`,_jsx(ParamField,{body:`code`,type:`string`,required:true,id:`param-code`,children:_jsxs(_components.p,{children:[`The one-time authorization code from\n`,_jsx(_components.code,{children:`GET /apps/oauth/authorize`}),`. Single-use, expires in 10 minutes.`]})}),`\n`,_jsx(ParamField,{body:`state`,type:`string`,required:true,id:`param-state`,children:_jsxs(_components.p,{children:[`The server-generated state token from the authorize call. Must match\nwhat was bound to the code server-side or the request fails with\n`,_jsx(_components.code,{children:`Invalid state parameter`}),`.`]})}),`\n`,_jsx(ParamField,{body:`code_verifier`,type:`string`,id:`param-code-verifier`,children:_jsxs(_components.p,{children:[`Required when the authorize call sent a `,_jsx(_components.code,{children:`code_challenge`}),`. Length 43-128\nchars. For `,_jsx(_components.code,{children:`S256`}),` flows, the server SHA-256 hashes this and compares\n(constant-time) against the stored challenge.`]})}),`\n`,_jsxs(Heading,{level:`3`,id:`grant-type-refresh_token`,children:[`Grant type: `,_jsx(_components.code,{children:`refresh_token`})]}),`\n`,_jsx(ParamField,{body:`grant_type`,type:`string`,required:true,id:`param-grant-type-1`,children:_jsxs(_components.p,{children:[`Must be `,_jsx(_components.code,{children:`refresh_token`}),`.`]})}),`\n`,_jsx(ParamField,{body:`refresh_token`,type:`string`,required:true,id:`param-refresh-token`,children:_jsx(_components.p,{children:`The current refresh token. Must not be expired, blacklisted, or\nalready rotated.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`status`,type:`integer`,id:`param-status`,children:`200 on success.`}),`\n`,_jsxs(ResponseField,{name:`state`,type:`string`,id:`param-state-1`,children:[_jsx(_components.code,{children:`success`}),` or `,_jsx(_components.code,{children:`error`}),`.`]}),`\n`,_jsx(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:_jsxs(Expandable,{title:`Token Object (RFC 6749 §5.1)`,children:[_jsx(ResponseField,{name:`access_token`,type:`string`,id:`param-access-token`,children:_jsxs(_components.p,{children:[`Opaque bearer token prefixed `,_jsx(_components.code,{children:`lms_token_`}),` followed by 64 hex chars.\nSend as `,_jsx(_components.code,{children:`Authorization: Bearer \u003ctoken>`}),` on `,_jsx(_components.code,{children:`/api/v1/*`}),` calls.`]})}),_jsx(ResponseField,{name:`refresh_token`,type:`string`,id:`param-refresh-token-1`,children:_jsxs(_components.p,{children:[`Opaque refresh token prefixed `,_jsx(_components.code,{children:`lms_refresh_`}),`. Use with\n`,_jsx(_components.code,{children:`grant_type=refresh_token`}),` to get a new access token.`]})}),_jsx(ResponseField,{name:`token_type`,type:`string`,id:`param-token-type`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`bearer`}),`.`]})}),_jsx(ResponseField,{name:`expires_in`,type:`integer`,id:`param-expires-in`,children:_jsxs(_components.p,{children:[`Access token lifetime in seconds. Always `,_jsx(_components.code,{children:`86400`}),` (24 hours).`]})}),_jsx(ResponseField,{name:`scope`,type:`string`,id:`param-scope`,children:_jsx(_components.p,{children:`Space-separated list of granted scopes (normalised — duplicates\nremoved and legacy aliases collapsed).`})})]})}),`\n`,_jsx(Heading,{level:`2`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"access_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lms_token_9fbb1c3e8d4a7b2e0a5d6f7c8b9e0d1c2a3b4c5d6e7f8091a2b3c4d5e6f70819\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refresh_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lms_refresh_5d6f7c8b9e0d1c2a3b4c5d6e7f80910a2b3c4d5e6f70819b8c4d5e6f7081923a\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bearer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_in\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`86400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scope\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"read_products write_metafields read_orders\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`token-lifetimes`,children:`Token Lifetimes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Token`}),_jsx(_components.th,{children:`TTL`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Access token`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`24 hours`}),` (`,_jsx(_components.code,{children:`expires_in: 86400`}),`)`]}),_jsxs(_components.td,{children:[`Used as `,_jsx(_components.code,{children:`Authorization: Bearer`}),` on `,_jsx(_components.code,{children:`/api/v1/*`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Refresh token`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`30 days`})}),_jsx(_components.td,{children:`Resets on every successful rotation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Authorization code`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`10 minutes`})}),_jsx(_components.td,{children:`Single-use; deleted after exchange.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`When you refresh, the old refresh token is replaced with a brand new pair\n(and its SHA-256 hash is blacklisted for 31 days as a backstop).\nRe-using a rotated refresh token returns `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`401 Invalid refresh token`})}),` —\nthe replayed value no longer matches any installation, so the lookup fails\nbefore the blacklist is even consulted. Either way the status is `,_jsx(_components.code,{children:`401`}),`;\ntreat any `,_jsx(_components.code,{children:`401`}),` from the token endpoint as “re-run the install handoff”.`]}),`\n`,_jsx(Heading,{level:`2`,id:`install/re-install-limits`,children:`Install/Re-install Limits`}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`grant_type=authorization_code`}),` would create a brand new active\ninstallation (or re-activate a previously disabled one), the server\nchecks per-shop function caps before issuing tokens. If the app ships\nfunctions and the merchant already has too many active installs of apps\nwith the same function types, the endpoint returns:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`409`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Cannot install: this store already has 1 active cart_transform function, and the per-shop limit is 1. Uninstall another cart_transform app before installing this one.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This check is skipped when re-issuing tokens for an already-active\ninstallation (no status flip = no new active install counted).`}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Error message`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Unsupported grant_type`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`grant_type`}),` is not `,_jsx(_components.code,{children:`authorization_code`}),` or `,_jsx(_components.code,{children:`refresh_token`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid or expired authorization code`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`code`}),` unknown (consumed or > 10 minutes old).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid state parameter`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`state`}),` doesn’t match the value bound to the code.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`State validation failed`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`state`}),` unknown or `,_jsx(_components.code,{children:`client_id`}),` doesn’t match.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`code_verifier is required for this authorization code`})}),_jsx(_components.td,{children:`Authorize call sent PKCE challenge but token call omitted verifier.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`code_verifier must be 43-128 characters`})}),_jsx(_components.td,{children:`PKCE verifier length out of range.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`code_verifier does not match the code_challenge`})}),_jsx(_components.td,{children:`PKCE verification failed (constant-time compare).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid client credentials`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`client_id`}),`/`,_jsx(_components.code,{children:`client_secret`}),` doesn’t match.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid refresh token`})}),_jsx(_components.td,{children:`No installation has this refresh token.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Refresh token has expired. Please re-authenticate.`})}),_jsx(_components.td,{children:`> 30 days since last rotation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Invalid refresh token`})}),_jsx(_components.td,{children:`Refresh token was rotated (replaced by a newer one) or revoked.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cannot install: this store already has \u003cn> active \u003ctype> function(s), and the per-shop limit is \u003cN>. ...`})}),_jsx(_components.td,{children:`Function caps prevent a new active install.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:`(throttler)`}),_jsx(_components.td,{children:`More than 10 requests/minute from this IP.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`refresh-loop-pattern`,children:`Refresh Loop Pattern`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Server-side helper — refresh before every API call when expiry is close.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` withFreshToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`installation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` msLeft`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`installation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`tokenExpiresAt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msLeft`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60_000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` installation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.launchmystore.io/apps/oauth/token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` grant_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'refresh_token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` refresh_token:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` installation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`refreshToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Persist the new pair — both old tokens are now blacklisted.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` db`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`installation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` accessToken:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`access_token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` refreshToken:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`refresh_token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` tokenExpiresAt:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`expires_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`access_token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`security-notes`,children:`Security Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Always send this request `,_jsx(_components.strong,{children:`server-side`}),`. Never expose `,_jsx(_components.code,{children:`client_secret`}),`\nin browser code.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`client_secret`}),` is `,_jsx(_components.strong,{children:`always required`}),` for `,_jsx(_components.code,{children:`grant_type=authorization_code`}),`\n— PKCE is verified `,_jsx(_components.em,{children:`in addition to`}),` the secret, not instead of it, so\neven PKCE flows must exchange the code server-side.`]}),`\n`,_jsxs(_components.li,{children:[`Successful exchange `,_jsx(_components.strong,{children:`consumes`}),` both the code and its state — both\nare deleted atomically.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`client_secret`}),` verification is brute-force resistant: requests are\nthrottled by the IP rate limit (10/min) and compared in constant time.\nThe secret is stored in plaintext (it is also the App Bridge session-token\nsigning key), so keep it server-side only and rotate it if exposed.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Token Exchange","api":"POST https://api.launchmystore.io/apps/oauth/token","description":"Exchange an authorization code or refresh token for an access token","href":"/api-reference/oauth/token"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Token Exchange","slug":"token-exchange","depth":1,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":2,"children":[{"title":"Grant type: authorization_code","slug":"grant-type-authorization_code","depth":3,"children":[]},{"title":"Grant type: refresh_token","slug":"grant-type-refresh_token","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Example Response","slug":"example-response","depth":2,"children":[]},{"title":"Token Lifetimes","slug":"token-lifetimes","depth":2,"children":[]},{"title":"Install/Re-install Limits","slug":"install/re-install-limits","depth":2,"children":[]},{"title":"Error Codes","slug":"error-codes","depth":2,"children":[]},{"title":"Refresh Loop Pattern","slug":"refresh-loop-pattern","depth":2,"children":[]},{"title":"Security Notes","slug":"security-notes","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Token Exchange","path":"/apps/oauth/token","servers":[{"url":"https://api.launchmystore.io"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"grant_type":[{"type":"string","description":"Must be `refresh_token` .","required":true}],"client_id":[{"type":"string","description":"Your app’s public client identifier.","required":true}],"client_secret":[{"type":"string","description":"Your app’s client secret, sent over TLS. Compared (constant-time) against the value returned by `/apps/credentials` . Because the secret doubles as the HS256 signing key for App Bridge session tokens, it is stored in plaintext (not hashed) — the host must sign JWTs with the same value your app verifies with. Treat it as a signing key: never expose it client-side, and rotate it from the developer dashboard if it leaks.","required":true}],"code":[{"type":"string","description":"The one-time authorization code from `GET /apps/oauth/authorize` . Single-use, expires in 10 minutes.","required":true}],"state":[{"type":"string","description":"The server-generated state token from the authorize call. Must match what was bound to the code server-side or the request fails with `Invalid state parameter` .","required":true}],"code_verifier":[{"type":"string","description":"Required when the authorize call sent a `code_challenge` . Length 43-128 chars. For `S256` flows, the server SHA-256 hashes this and compares (constant-time) against the stored challenge."}],"refresh_token":[{"type":"string","description":"The current refresh token. Must not be expired, blacklisted, or already rotated.","required":true}]}}],"examples":{"example":{"value":{"grant_type":"\u003cstring>","client_id":"\u003cstring>","client_secret":"\u003cstring>","code":"\u003cstring>","state":"\u003cstring>","code_verifier":"\u003cstring>","refresh_token":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"status":[{"type":"integer","description":"200 on success."}],"state":[{"type":"string","description":"`success` or `error` ."}],"data":[{"type":"object","properties":{"access_token":[{"type":"string","description":"Opaque bearer token prefixed `lms_token_` followed by 64 hex chars. Send as `Authorization: Bearer \u003ctoken>` on `/api/v1/*` calls."}],"refresh_token":[{"type":"string","description":"Opaque refresh token prefixed `lms_refresh_` . Use with `grant_type=refresh_token` to get a new access token."}],"token_type":[{"type":"string","description":"Always `bearer` ."}],"expires_in":[{"type":"integer","description":"Access token lifetime in seconds. Always `86400` (24 hours)."}],"scope":[{"type":"string","description":"Space-separated list of granted scopes (normalised — duplicates removed and legacy aliases collapsed)."}]}}]}}],"examples":{"example":{"value":{"status":123,"state":"\u003cstring>","data":{"access_token":"\u003cstring>","refresh_token":"\u003cstring>","token_type":"\u003cstring>","expires_in":123,"scope":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"tradefusiontechnologiespvtltd","siteName":"LaunchMyStore Developers","title":"Token Exchange - LaunchMyStore Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-20T12:53:10.431Z","originalFileLocation":"api-reference/oauth/token.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Exchange an authorization code or refresh token for an access token\">\u003cmeta data-mint-head name=\"application-name\" content=\"LaunchMyStore Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Token Exchange - LaunchMyStore Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Exchange an authorization code or refresh token for an access token\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LaunchMyStore Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.launchmystore.io/api-reference/oauth/token\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tradefusiontechnologiespvtltd.mintlify.app/_mintlify/api/og/v2?division=OAuth\u0026amp;title=Token+Exchange\u0026amp;description=Exchange+an+authorization+code+or+refresh+token+for+an+access+token\u0026amp;theme=7262308de22b2a4febf4ce58\u0026amp;signature=3812300932d7dd11cebbb3c01da184b2a043538393a575898f1c0500a2f81b8b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Token Exchange - LaunchMyStore Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Exchange an authorization code or refresh token for an access token\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tradefusiontechnologiespvtltd.mintlify.app/_mintlify/api/og/v2?division=OAuth\u0026amp;title=Token+Exchange\u0026amp;description=Exchange+an+authorization+code+or+refresh+token+for+an+access+token\u0026amp;theme=7262308de22b2a4febf4ce58\u0026amp;signature=3812300932d7dd11cebbb3c01da184b2a043538393a575898f1c0500a2f81b8b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/tradefusiontechnologiespvtltd/AxaKSy1cjHGQnY9E/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LaunchMyStore Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B82F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.launchmystore.io/api-reference/oauth/token\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/oauth/token.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.launchmystore.io/#organization\",\"name\":\"LaunchMyStore Developers\",\"url\":\"https://docs.launchmystore.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tradefusiontechnologiespvtltd/h0D_voj1Mzg300-x/logo/light.svg?fit=max\u0026auto=format\u0026n=h0D_voj1Mzg300-x\u0026q=85\u0026s=22ebdb2605f91ccf72f71097a82d6928\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.launchmystore.io#website\",\"name\":\"LaunchMyStore Developers\",\"url\":\"https://docs.launchmystore.io\",\"publisher\":{\"@id\":\"https://docs.launchmystore.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.launchmystore.io/api-reference/oauth/token#webpage\",\"url\":\"https://docs.launchmystore.io/api-reference/oauth/token\",\"name\":\"Token Exchange\",\"description\":\"Exchange an authorization code or refresh token for an access token\",\"dateModified\":\"2026-07-20T12:53:10.431Z\",\"isPartOf\":{\"@id\":\"https://docs.launchmystore.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.launchmystore.io/api-reference/oauth/token#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.launchmystore.io/api-reference/oauth/token#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OAuth\",\"item\":\"https://docs.launchmystore.io/api-reference/oauth/authorize\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Token Exchange\",\"item\":\"https://docs.launchmystore.io/api-reference/oauth/token\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.launchmystore.io/api-reference/oauth/token#apireference\",\"headline\":\"Token Exchange\",\"name\":\"Token Exchange\",\"description\":\"Exchange an authorization code or refresh token for an access token\",\"url\":\"https://docs.launchmystore.io/api-reference/oauth/token\",\"mainEntityOfPage\":{\"@id\":\"https://docs.launchmystore.io/api-reference/oauth/token#webpage\"},\"dateModified\":\"2026-07-20T12:53:10.431Z\",\"publisher\":{\"@id\":\"https://docs.launchmystore.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.launchmystore.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LaunchMyStore Developers\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"LaunchMyStore Developers","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/launchmystore"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/launchmystore"},{"anchor":"App Store","icon":"grid-2","href":"https://app.launchmystore.io/marketplace"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Theme Development","pages":[{"title":"Theme Development","href":"/aqua/overview"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Overview","href":"/api-reference/overview"},{"title":"API Authentication","href":"/api-reference/authentication"},{"title":"API Rate Limits","href":"/api-reference/rate-limits"}]},{"group":"OAuth","pages":[{"title":"Authorize","api":"GET https://api.launchmystore.io/apps/oauth/authorize","description":"Start the OAuth 2.0 authorization code flow for a merchant","href":"/api-reference/oauth/authorize"},{"title":"Token Exchange","api":"POST https://api.launchmystore.io/apps/oauth/token","href":"/api-reference/oauth/token"},{"title":"Revoke Token","api":"POST https://api.launchmystore.io/apps/oauth/revoke","description":"Invalidate an access token (and its paired refresh token)","href":"/api-reference/oauth/revoke"},{"title":"Scopes","href":"/api-reference/oauth/scopes"}]},{"group":"Apps","pages":[{"title":"App Versions","api":"GET https://api.launchmystore.io/apps/developer/{appId}/versions","href":"/api-reference/apps/versions"},{"title":"Installation Rollback","api":"POST https://api.launchmystore.io/apps/store/installations/{installationId}/rollback","href":"/api-reference/apps/rollback"},{"title":"App Installations","api":"GET https://api.launchmystore.io/apps/store/installed","href":"/api-reference/apps/installations"},{"title":"Test a Function","api":"POST https://api.launchmystore.io/apps/functions/test","href":"/api-reference/apps/function-test"},{"title":"Function runs","href":"/api-reference/apps/function-runs"}]},{"group":"App Billing","pages":[{"title":"App Subscriptions","api":"POST https://api.launchmystore.io/apps/billing/subscribe","href":"/api-reference/app-billing/subscriptions"},{"title":"App Billing Transactions","api":"GET https://api.launchmystore.io/apps/billing/transactions","href":"/api-reference/app-billing/transactions"},{"title":"Usage Records","api":"POST https://api.launchmystore.io/api/v1/billing/usage","href":"/api-reference/app-billing/usage-records"}]},{"group":"App Analytics","pages":[{"title":"App Analytics","api":"GET https://api.launchmystore.io/apps/developer/analytics","href":"/api-reference/app-analytics/overview"}]},{"group":"App Settings","pages":[{"title":"Get App Settings","api":"GET https://api.launchmystore.io/apps/installations/{installationId}/settings","href":"/api-reference/app-settings/get"},{"title":"Update App Settings","api":"PUT https://api.launchmystore.io/apps/installations/{installationId}/settings","href":"/api-reference/app-settings/update"}]},{"group":"Developer","pages":[{"title":"Developer Payouts","api":"GET https://api.launchmystore.io/apps/developer/payouts","href":"/api-reference/developer/payouts"},{"title":"Payout Methods","api":"GET https://api.launchmystore.io/apps/developer/payout-method","href":"/api-reference/developer/payout-methods"}]},{"group":"Products","pages":[{"title":"List Products","api":"GET https://api.launchmystore.io/api/v1/products.json","href":"/api-reference/products/list"},{"title":"Get Product","api":"GET https://api.launchmystore.io/api/v1/products/:id.json","href":"/api-reference/products/get"},{"title":"Create Product","api":"POST https://api.launchmystore.io/api/v1/products.json","href":"/api-reference/products/create"},{"title":"Update Product","api":"PUT https://api.launchmystore.io/api/v1/products/:id.json","href":"/api-reference/products/update"},{"title":"Delete Product","api":"DELETE https://api.launchmystore.io/api/v1/products/:id.json","href":"/api-reference/products/delete"}]},{"group":"Orders","pages":[{"title":"List Orders","api":"GET https://api.launchmystore.io/api/v1/orders.json","href":"/api-reference/orders/list"},{"title":"Get Order","api":"GET https://api.launchmystore.io/api/v1/orders/:id.json","href":"/api-reference/orders/get"},{"title":"Create Order","api":"POST https://api.launchmystore.io/api/v1/orders.json","href":"/api-reference/orders/create"},{"title":"Update Order","api":"PUT https://api.launchmystore.io/orders/update/:orderId","href":"/api-reference/orders/update"},{"title":"Fulfill Order","api":"POST https://api.launchmystore.io/api/v1/orders/:orderId/fulfillments.json","href":"/api-reference/orders/fulfill"}]},{"group":"Customers","pages":[{"title":"List Customers","api":"GET https://api.launchmystore.io/api/v1/customers.json","href":"/api-reference/customers/list"},{"title":"Get Customer","api":"GET https://api.launchmystore.io/api/v1/customers/{id}.json","href":"/api-reference/customers/get"},{"title":"Create Customer","api":"POST https://api.launchmystore.io/api/v1/customers.json","href":"/api-reference/customers/create"},{"title":"Update Customer","api":"PUT https://api.launchmystore.io/api/v1/customers/{id}.json","href":"/api-reference/customers/update"}]},{"group":"Inventory","pages":[{"title":"List Inventory Levels","api":"GET https://api.launchmystore.io/api/v1/inventory_levels.json","href":"/api-reference/inventory/list"},{"title":"Adjust Inventory","api":"POST https://api.launchmystore.io/api/v1/inventory_levels/adjust.json","href":"/api-reference/inventory/adjust"},{"title":"Set Inventory Level","api":"POST https://api.launchmystore.io/api/v1/inventory_levels/set.json","href":"/api-reference/inventory/set"}]},{"group":"Webhooks","pages":[{"title":"Webhooks Overview","href":"/api-reference/webhooks/overview"},{"title":"Webhook Topics","href":"/api-reference/webhooks/topics"},{"title":"Webhook Verification","href":"/api-reference/webhooks/verification"},{"title":"GDPR Webhooks","href":"/api-reference/webhooks/gdpr"},{"title":"Webhook Delivery Logs","api":"GET https://api.launchmystore.io/apps/store/webhook-logs","href":"/api-reference/webhooks/delivery-logs"}]},{"group":"Collections","pages":[{"title":"List Collections","api":"GET https://api.launchmystore.io/api/v1/collections.json","href":"/api-reference/collections/list"},{"title":"Get Collection","api":"GET https://api.launchmystore.io/api/v1/collections/{id}.json","href":"/api-reference/collections/get"},{"title":"Create Collection","api":"POST https://api.launchmystore.io/api/v1/collections.json","href":"/api-reference/collections/create"},{"title":"Update Collection","api":"PUT https://api.launchmystore.io/api/v1/collections/{id}.json","href":"/api-reference/collections/update"},{"title":"Delete Collection","api":"DELETE https://api.launchmystore.io/api/v1/collections/{id}.json","href":"/api-reference/collections/delete"}]},{"group":"Blogs","pages":[{"title":"List Blogs","api":"GET https://api.launchmystore.io/api/v1/blogs.json","href":"/api-reference/blogs/list"},{"title":"Get Blog","api":"GET https://api.launchmystore.io/api/v1/blogs/:id.json","href":"/api-reference/blogs/get"},{"title":"Create Blog","api":"POST https://api.launchmystore.io/api/v1/blogs.json","href":"/api-reference/blogs/create"},{"title":"Update Blog","api":"PUT https://api.launchmystore.io/api/v1/blogs/:id.json","href":"/api-reference/blogs/update"},{"title":"Delete Blog","api":"DELETE https://api.launchmystore.io/api/v1/blogs/:id.json","href":"/api-reference/blogs/delete"},{"title":"List Articles","api":"GET https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json","href":"/api-reference/blogs/articles/list"},{"title":"Get Article","api":"GET https://api.launchmystore.io/api/v1/articles/:id.json","href":"/api-reference/blogs/articles/get"},{"title":"Create Article","api":"POST https://api.launchmystore.io/api/v1/blogs/:blog_id/articles.json","href":"/api-reference/blogs/articles/create"},{"title":"Update Article","api":"PUT https://api.launchmystore.io/api/v1/articles/:id.json","href":"/api-reference/blogs/articles/update"},{"title":"Delete Article","api":"DELETE https://api.launchmystore.io/api/v1/articles/:id.json","href":"/api-reference/blogs/articles/delete"}]},{"group":"Pages","pages":[{"title":"List Pages","api":"GET https://api.launchmystore.io/api/v1/pages.json","href":"/api-reference/pages/list"},{"title":"Get Page","api":"GET https://api.launchmystore.io/api/v1/pages/:id.json","href":"/api-reference/pages/get"},{"title":"Create Page","api":"POST https://api.launchmystore.io/api/v1/pages.json","href":"/api-reference/pages/create"},{"title":"Update Page","api":"PUT https://api.launchmystore.io/api/v1/pages/:id.json","href":"/api-reference/pages/update"},{"title":"Delete Page","api":"DELETE https://api.launchmystore.io/api/v1/pages/:id.json","href":"/api-reference/pages/delete"}]},{"group":"Menus","pages":[{"title":"List Menus","api":"GET https://api.launchmystore.io/api/v1/menus.json","href":"/api-reference/menus/list"},{"title":"Get Menu","api":"GET https://api.launchmystore.io/api/v1/menus/:id.json","href":"/api-reference/menus/get"},{"title":"Create Menu","api":"POST https://api.launchmystore.io/api/v1/menus.json","href":"/api-reference/menus/create"},{"title":"Update Menu","api":"PUT https://api.launchmystore.io/api/v1/menus/:id.json","href":"/api-reference/menus/update"},{"title":"Delete Menu","api":"DELETE https://api.launchmystore.io/api/v1/menus/:id.json","href":"/api-reference/menus/delete"}]},{"group":"Themes","pages":[{"title":"List Themes","api":"GET https://api.launchmystore.io/api/v1/themes.json","href":"/api-reference/themes/list"},{"title":"Get Theme","api":"GET https://api.launchmystore.io/api/v1/themes/{id}.json","href":"/api-reference/themes/get"},{"title":"List Theme Assets","api":"GET https://api.launchmystore.io/api/v1/themes/{theme_id}/assets.json","href":"/api-reference/themes/assets"},{"title":"Create / Update Theme Asset","api":"PUT https://api.launchmystore.io/api/v1/themes/{theme_id}/assets.json","href":"/api-reference/themes/asset-update"},{"title":"Delete Theme Asset","api":"DELETE https://api.launchmystore.io/api/v1/themes/{theme_id}/assets.json","href":"/api-reference/themes/asset-delete"},{"title":"Theme Settings","api":"GET https://api.launchmystore.io/api/v1/themes/{theme_id}/settings.json","href":"/api-reference/themes/settings"},{"title":"Template Sections","api":"GET https://api.launchmystore.io/api/v1/themes/{theme_id}/templates/{template}/sections.json","href":"/api-reference/themes/sections"}]},{"group":"Shipping Zones","pages":[{"title":"List Shipping Zones","api":"GET https://api.launchmystore.io/api/v1/shipping_zones.json","href":"/api-reference/shipping-zones/list"},{"title":"Create Shipping Zone","api":"POST https://api.launchmystore.io/api/v1/shipping_zones.json","href":"/api-reference/shipping-zones/create"},{"title":"Update Shipping Zone","api":"PUT https://api.launchmystore.io/api/v1/shipping_zones/{zone_id}.json","href":"/api-reference/shipping-zones/update"},{"title":"Delete Shipping Zone","api":"DELETE https://api.launchmystore.io/api/v1/shipping_zones/{zone_id}.json","href":"/api-reference/shipping-zones/delete"}]},{"group":"Gift Cards","pages":[{"title":"List Gift Cards","api":"GET https://api.launchmystore.io/api/v1/gift_cards.json","href":"/api-reference/gift-cards/list"},{"title":"Get Gift Card","api":"GET https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}.json","href":"/api-reference/gift-cards/get"},{"title":"Create Gift Card","api":"POST https://api.launchmystore.io/api/v1/gift_cards.json","href":"/api-reference/gift-cards/create"},{"title":"Disable Gift Card","api":"POST https://api.launchmystore.io/api/v1/gift_cards/{gift_card_id}/disable.json","href":"/api-reference/gift-cards/disable"}]},{"group":"Email Templates","pages":[{"title":"List Email Templates","api":"GET https://api.launchmystore.io/api/v1/email-templates.json","href":"/api-reference/email-templates/list"},{"title":"Create / Update Email Template","api":"POST https://api.launchmystore.io/api/v1/email-templates.json","href":"/api-reference/email-templates/create"},{"title":"Delete Email Template","api":"DELETE https://api.launchmystore.io/api/v1/email-templates/{id}.json","href":"/api-reference/email-templates/delete"}]},{"group":"Sales Channels","pages":[{"title":"Create Sales Channel","api":"POST https://api.launchmystore.io/api/v1/sales_channels.json","href":"/api-reference/sales-channels/create"},{"title":"List Product Listings","api":"GET https://api.launchmystore.io/api/v1/product_listings.json","href":"/api-reference/product-listings/list"},{"title":"Create Product Listing","api":"POST https://api.launchmystore.io/api/v1/product_listings.json","href":"/api-reference/product-listings/create"}]},{"group":"Discounts","pages":[{"title":"List Discounts","api":"GET https://api.launchmystore.io/api/v1/discounts.json","href":"/api-reference/discounts/list"},{"title":"Get Discount","api":"GET https://api.launchmystore.io/api/v1/discounts/{id}.json","href":"/api-reference/discounts/get"},{"title":"Create Discount","api":"POST https://api.launchmystore.io/api/v1/discounts.json","href":"/api-reference/discounts/create"},{"title":"Update Discount","api":"PUT https://api.launchmystore.io/api/v1/discounts/{id}.json","href":"/api-reference/discounts/update"},{"title":"Delete Discount","api":"DELETE https://api.launchmystore.io/api/v1/discounts/{id}.json","href":"/api-reference/discounts/delete"}]},{"group":"Metafields","pages":[{"title":"Metafields Overview","href":"/api-reference/metafields/overview"},{"title":"List Metafields","api":"GET https://api.launchmystore.io/api/v1/metafields.json","href":"/api-reference/metafields/list"},{"title":"Get Metafield by ID (Admin API only)","href":"/api-reference/metafields/get"},{"title":"Create or Upsert Metafield","api":"POST https://api.launchmystore.io/api/v1/metafields.json","href":"/api-reference/metafields/create"},{"title":"Update Metafield","api":"PUT https://api.launchmystore.io/api/v1/metafields/:id.json","href":"/api-reference/metafields/update"},{"title":"Delete Metafield","api":"DELETE https://api.launchmystore.io/api/v1/metafields/:id.json","href":"/api-reference/metafields/delete"},{"title":"Bulk Upsert Metafields (Admin API only)","href":"/api-reference/metafields/bulk"},{"group":"Definitions","pages":[{"title":"Metafield Definitions Overview","href":"/api-reference/metafields/definitions/overview"},{"title":"List Metafield Definitions","api":"GET https://api.launchmystore.io/metafield-definitions","href":"/api-reference/metafields/definitions/list"},{"title":"Get Metafield Definition","api":"GET https://api.launchmystore.io/metafield-definitions/:id","href":"/api-reference/metafields/definitions/get"},{"title":"Create Metafield Definition","api":"POST https://api.launchmystore.io/metafield-definitions","href":"/api-reference/metafields/definitions/create"},{"title":"Update Metafield Definition","api":"PUT https://api.launchmystore.io/metafield-definitions/:id","href":"/api-reference/metafields/definitions/update"},{"title":"Delete Metafield Definition","api":"DELETE https://api.launchmystore.io/metafield-definitions/:id","href":"/api-reference/metafields/definitions/delete"}]}]},{"group":"Fulfillments","pages":[{"title":"List Fulfillments","api":"GET https://api.launchmystore.io/api/v1/fulfillments.json","href":"/api-reference/fulfillments/list"},{"title":"Create Fulfillment","api":"POST https://api.launchmystore.io/api/v1/orders/{order_id}/fulfillments.json","href":"/api-reference/fulfillments/create"},{"title":"Update Fulfillment","api":"PUT https://api.launchmystore.io/api/v1/fulfillments/{fulfillment_id}.json","href":"/api-reference/fulfillments/update"},{"title":"Delete Fulfillment","api":"DELETE https://api.launchmystore.io/api/v1/fulfillments/{fulfillment_id}.json","href":"/api-reference/fulfillments/delete"},{"title":"Fulfillment Services","href":"/api-reference/fulfillments/services"}]},{"group":"Analytics","pages":[{"title":"Dashboard Summary","api":"GET https://api.launchmystore.io/api/v1/analytics/summary","href":"/api-reference/analytics/overview"},{"title":"Sales Analytics","api":"GET https://api.launchmystore.io/api/v1/analytics/sales","href":"/api-reference/analytics/sales"},{"title":"Top Products","api":"GET https://api.launchmystore.io/api/v1/analytics/products/top","href":"/api-reference/analytics/products"}]},{"group":"Billing","pages":[{"title":"Get Billing Summary","api":"GET https://api.launchmystore.io/api/v1/billing","href":"/api-reference/billing/summary"},{"title":"List Subscriptions","api":"GET https://api.launchmystore.io/api/v1/billing/subscriptions","href":"/api-reference/billing/subscriptions"},{"title":"List Invoices","api":"GET https://api.launchmystore.io/api/v1/billing/invoices","href":"/api-reference/billing/invoices"}]},{"group":"Settings","pages":[{"title":"Get Store Settings","api":"GET https://api.launchmystore.io/api/v1/settings","href":"/api-reference/settings/get"},{"title":"Update Store Settings","api":"PUT https://api.launchmystore.io/api/v1/settings","href":"/api-reference/settings/update"},{"title":"List Shipping Zones","api":"GET https://api.launchmystore.io/api/v1/settings/shipping","href":"/api-reference/settings/shipping"},{"title":"List Payment Providers","api":"GET https://api.launchmystore.io/api/v1/settings/payments","href":"/api-reference/settings/payments"},{"title":"List Tax Rules","api":"GET https://api.launchmystore.io/api/v1/settings/taxes","href":"/api-reference/settings/taxes"}]},{"group":"Cart","pages":[{"title":"Get Cart","api":"GET https://your-store.launchmystore.io/cart.js","href":"/api-reference/cart/get"},{"title":"Add to Cart","api":"POST https://your-store.launchmystore.io/cart/add.js","href":"/api-reference/cart/add"},{"title":"Update Cart","api":"POST https://your-store.launchmystore.io/cart/update.js","href":"/api-reference/cart/update"},{"title":"Remove from Cart","api":"POST https://your-store.launchmystore.io/cart/change.js","href":"/api-reference/cart/remove"},{"title":"Clear Cart","api":"POST https://{shop-domain}/cart/clear.js","href":"/api-reference/cart/clear"}]},{"group":"Variants","pages":[{"title":"List Variants","api":"GET https://api.launchmystore.io/api/v1/products/{id}.json","href":"/api-reference/variants/list"},{"title":"Get Variant","api":"GET https://api.launchmystore.io/variants/get-single-variant/{id}","href":"/api-reference/variants/get"},{"title":"Create Variant","api":"POST https://api.launchmystore.io/variants/bulk-add-variant/{product_id}","href":"/api-reference/variants/create"},{"title":"Update Variant","api":"PATCH https://api.launchmystore.io/variants/update-single-variant/{id}","href":"/api-reference/variants/update"},{"title":"Delete Variant","api":"DELETE https://api.launchmystore.io/variants/delete-single-variant/{id}","href":"/api-reference/variants/delete"}]},{"group":"Locations","pages":[{"title":"List Locations","api":"GET https://api.launchmystore.io/warehouse/get-all-warehouses","href":"/api-reference/locations/list"},{"title":"Create Location","api":"POST https://api.launchmystore.io/warehouse/add-warehouse","href":"/api-reference/locations/create"}]},{"group":"Shop","pages":[{"title":"Get Shop","api":"GET https://api.launchmystore.io/api/v1/shop.json","href":"/api-reference/shop/get"},{"title":"Update Shop","api":"PUT https://api.launchmystore.io/account/add-business-detail","href":"/api-reference/shop/update"}]},{"group":"Policies","pages":[{"title":"List Policies","api":"GET https://api.launchmystore.io/policies/get-all-policies","href":"/api-reference/policies/list"},{"title":"Update Policy","api":"PATCH https://api.launchmystore.io/policies/update-policies/{policyId}","href":"/api-reference/policies/update"}]},{"group":"Search","pages":[{"title":"Search Products","api":"GET https://api.launchmystore.io/search/suggest.json","href":"/api-reference/search/products"},{"title":"Search Collections","api":"GET https://{store-domain}/search/suggest.json","href":"/api-reference/search/collections"},{"title":"Search Autocomplete","api":"GET https://{store-domain}/search/suggest.json","href":"/api-reference/search/autocomplete"}]},{"group":"Files","pages":[{"title":"List Files","api":"GET https://api.launchmystore.io/api/v1/files.json","href":"/api-reference/files/list"},{"title":"Upload File","api":"POST https://api.launchmystore.io/api/v1/files.json","href":"/api-reference/files/upload"},{"title":"Delete File","api":"DELETE https://api.launchmystore.io/api/v1/files/{file_id}.json","href":"/api-reference/files/delete"}]}]}]},"basePath":"","title":"Token Exchange - LaunchMyStore Developers","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js"]}