Refresh token missing, expired or already used. Log in again.
If several requests fail with 401 at the same time, refresh once and retry them all after it completes. Two parallel refresh calls would use the same single-use token and the second would fail.
curl -X POST -c cookies.txt -b cookies.txt \ https://apitest.tunimobile.com/v1/token/refresh
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TuniMobile Integration API","description":"Sell TuniMobile recharge vouchers (Tunisie Telecom, Orange, Ooredoo) from your own application.","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"favicon":"https://mintcdn.com/tuni-mobile/Z828WuxAtlYeXtz_/favicon.svg?fit=max\u0026auto=format\u0026n=Z828WuxAtlYeXtz_\u0026q=85\u0026s=751b3784f11581568ccef74e925f1179","api":{"playground":{"display":"none"},"mdx":{"server":["https://apitest.tunimobile.com/v1","https://api.tunimobile.com/v1"]}},"navbar":{"primary":{"type":"button","label":"TuniMobile","href":"https://tunimobile.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tuni-mobile","hasAudioNarration":false,"actualSubdomain":"tuni-mobile","customDomains":["docs.tunimobile.com"],"gitSource":{"type":"artifacts","owner":"prod","repo":"6ae21fe4ea96bbaeeb8784af","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6ae21ffba70829123067bb16"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae22000a70829123067bb6d","collectionId":"05866f62-ca31-443e-b395-f9b61dfd0860","liveDeploymentHistoryId":"6ae22000a70829123067bb6d","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae2394a0ef2a112dc97d4d0","clientVersion":"0.0.4005","searchFilterCounts":[{"language":"default","tag":"Getting Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/auth/refresh","slug":"/api/auth/refresh","pageMetadata":{"title":"Refresh the session","description":"Get a new access token using the refresh_token cookie.","api":"POST /token/refresh","href":"/api/auth/refresh"},"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: \"Get a new access token using the refresh_token cookie.\"\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={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Table,Tip,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Public endpoint. Uses the `,_jsx(_components.code,{children:`refresh_token`}),` cookie to issue a new `,_jsx(_components.code,{children:`BEARER`}),` cookie `,_jsxs(_components.strong,{children:[`and a new `,_jsx(_components.code,{children:`refresh_token`}),` cookie`]}),`. No body.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The refresh token is single use. Always store the new `,_jsx(_components.code,{children:`refresh_token`}),` cookie from the response: the old one stops working.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200`}),`: new cookies are set. The body does not contain the tokens.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Refresh token missing, expired or already used. Log in again.`})]})})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If several requests fail with `,_jsx(_components.code,{children:`401`}),` at the same time, refresh `,_jsx(_components.strong,{children:`once`}),` and retry them all after it completes. Two parallel refresh calls would use the same single-use token and the second would fail.`]})})]})}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":"Refresh the session","description":"Get a new access token using the refresh_token cookie.","api":"POST /token/refresh","href":"/api/auth/refresh"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[199,217,"pre:`pre`,span:`span`,strong:`strong`,tb"],[313,355,"CodeBlock,Heading,RequestExample,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if("],[405,422,"RequestExample)_missingMdxReference(`RequestExample`,true);if(!Table)_missingMdx"],[2156,2156,",`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,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:`2`,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:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cookies.txt`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -b`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cookies.txt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://apitest.tunimobile.com/v1/token/refresh`})}),`\n`]})})})})"]]},"mdxExtracts":{"tableOfContents":[{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -c\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> cookies.txt\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -b\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> cookies.txt\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://apitest.tunimobile.com/v1/token/refresh\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Refresh the session","path":"/token/refresh","servers":[{"url":"https://apitest.tunimobile.com/v1"},{"url":"https://api.tunimobile.com/v1"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"tuni-mobile","siteName":"TuniMobile Integration API","title":"Refresh the session - TuniMobile Integration API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T18:05:07.023Z","originalFileLocation":"api/auth/refresh.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=\"Get a new access token using the refresh_token cookie.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TuniMobile Integration API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_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/tuni-mobile/hk79GHUBoQsFCvCv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Refresh the session - TuniMobile Integration API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get a new access token using the refresh_token cookie.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TuniMobile Integration API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tunimobile.com/api/auth/refresh\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tuni-mobile.mintlify.app/_mintlify/api/og/v2?division=Authentication\u0026amp;title=Refresh+the+session\u0026amp;description=Get+a+new+access+token+using+the+refresh_token+cookie.\u0026amp;theme=df44427d4ddbca4dea795833\u0026amp;signature=87d9f702a098fec31378b33c227d6b613da78feb4cff5ede517c6d2e15858fde\">\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=\"Refresh the session - TuniMobile Integration API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get a new access token using the refresh_token cookie.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tuni-mobile.mintlify.app/_mintlify/api/og/v2?division=Authentication\u0026amp;title=Refresh+the+session\u0026amp;description=Get+a+new+access+token+using+the+refresh_token+cookie.\u0026amp;theme=df44427d4ddbca4dea795833\u0026amp;signature=87d9f702a098fec31378b33c227d6b613da78feb4cff5ede517c6d2e15858fde\">\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/tuni-mobile/hk79GHUBoQsFCvCv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TuniMobile Integration API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tunimobile.com/api/auth/refresh\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/auth/refresh.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tunimobile.com/#organization\",\"name\":\"TuniMobile Integration API\",\"url\":\"https://docs.tunimobile.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tunimobile.com#website\",\"name\":\"TuniMobile Integration API\",\"url\":\"https://docs.tunimobile.com\",\"publisher\":{\"@id\":\"https://docs.tunimobile.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tunimobile.com/api/auth/refresh#webpage\",\"url\":\"https://docs.tunimobile.com/api/auth/refresh\",\"name\":\"Refresh the session\",\"description\":\"Get a new access token using the refresh_token cookie.\",\"dateModified\":\"2026-10-28T18:05:07.023Z\",\"isPartOf\":{\"@id\":\"https://docs.tunimobile.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tunimobile.com/api/auth/refresh#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tunimobile.com/api/auth/refresh#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Authentication\",\"item\":\"https://docs.tunimobile.com/api/auth/login\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refresh the session\",\"item\":\"https://docs.tunimobile.com/api/auth/refresh\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tunimobile.com/api/auth/refresh#apireference\",\"headline\":\"Refresh the session\",\"name\":\"Refresh the session\",\"description\":\"Get a new access token using the refresh_token cookie.\",\"url\":\"https://docs.tunimobile.com/api/auth/refresh\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tunimobile.com/api/auth/refresh#webpage\"},\"dateModified\":\"2026-10-28T18:05:07.023Z\",\"publisher\":{\"@id\":\"https://docs.tunimobile.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tunimobile.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TuniMobile Integration API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"TuniMobile Integration API","nav":{"global":null,"pages":[{"group":"Getting Started","pages":[{"title":"Introduction","icon":"house","href":"/index"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Basics","pages":[{"title":"Requests and responses","icon":"arrow-right-arrow-left","href":"/basics/requests-and-responses"},{"title":"Authentication","icon":"key","href":"/basics/authentication"},{"title":"Terminal API key","icon":"mobile","href":"/basics/terminal-api-key"}]},{"group":"Authentication","pages":[{"title":"Log in","description":"Log the user in and set the BEARER and refresh_token cookies.","api":"POST /login_check","href":"/api/auth/login"},{"title":"Refresh the session","api":"POST /token/refresh","href":"/api/auth/refresh"},{"title":"Log out","description":"Expire the session cookies.","api":"GET /user/logout","href":"/api/auth/logout"}]},{"group":"Account","pages":[{"title":"Get the profile","api":"POST /user/do_action","href":"/api/account/profile"},{"title":"Get the balance","api":"POST /user/do_action","href":"/api/account/balance"}]},{"group":"Terminal","pages":[{"title":"Register / check the terminal","api":"POST /terminal/do_action","href":"/api/terminal/register"}]},{"group":"Vouchers","pages":[{"title":"Generate a voucher","sidebarTitle":"Generate (printVoucher)","api":"POST /voucher/do_action","href":"/api/vouchers/generate"},{"title":"Confirm a printed voucher","sidebarTitle":"Confirm (confirmVoucher)","api":"POST /voucher/do_action","href":"/api/vouchers/confirm"},{"title":"Reprint an unconfirmed voucher","sidebarTitle":"Reprint (reprintVoucher)","api":"POST /voucher/do_action","href":"/api/vouchers/reprint"},{"title":"Print a duplicate of a confirmed voucher","sidebarTitle":"Duplicate (duplicateVoucher)","api":"POST /voucher/do_action","href":"/api/vouchers/duplicate"},{"title":"Confirm a reprint or duplicate","sidebarTitle":"Confirm reprint (confirmReprintVoucher)","api":"POST /voucher/do_action","href":"/api/vouchers/confirm-reprint"},{"title":"List the voucher history","sidebarTitle":"History","api":"POST /vouchers","href":"/api/vouchers/history"}]},{"group":"Sales sessions","pages":[{"title":"Open / close a sales session","sidebarTitle":"Close and open session","api":"POST /session/","href":"/api/sessions/rotate"}]},{"group":"Reference","pages":[{"title":"Voucher statuses","icon":"list-check","href":"/reference/voucher-statuses"},{"title":"Errors","icon":"triangle-exclamation","href":"/reference/errors"}]}]},"title":"Refresh the session - TuniMobile Integration API","buildId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","deploymentId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-rBlzXElK.js","utils-AjnlCZis.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-swvqTHUt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CG9fqVU0.js","snippetPresets-CQaUsst6.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-DAdT3l54.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B1x8JMQI.js","shallow-D3oUTT8_.js","getApiPlaygroundDisplay-CXVJ98Sz.js","CodeSnippet-HbTSvyGs.js","CodeSnippets-DvgXFP0T.js","Page-C2raW8UD.js","getPastedJson-CfDE0eLj.js","icon-DBPqa2DN.js","MethodPill-86CHHFOO.js","DuplicateIcon-B5BXvyBd.js","createIcon-C_r05QJX.js","DynamicMarkdown-Cp6hhEk1.js","SectionHeading-RZjzOLoo.js","axios-vUo_bRtp.js"]}