Use data.token as the bearer credential on onboarding, wallet, webhook,
and partner-settings calls. Service endpoints — virtual accounts, transfers,
bills payment, and
subscriptions — accept this token or
an API key. See below.
This login token expires. For a long-running service integration, prefer
an API key on the service endpoints rather than re-logging in. Onboarding
and settings still require this token.
Token lifetime — read this before you integrate
expires_in is seconds, and today that’s 7200 (2 hours) by default. There
is no refresh-token endpoint. When a token expires, requests fail with
401 Unauthenticated and the only way to get a new one is to call
Login again with your email and password.For a quick dashboard session this is normal. For a server-to-server
integration that only calls service endpoints, use an API key instead —
it does not expire on this 2-hour clock. If you are calling onboarding,
wallet, webhooks, or partner settings unattended, your backend needs one of:
a small wrapper that catches 401s and transparently re-authenticates
with a stored email/password before retrying, or
a scheduled re-login every ~90 minutes to keep a warm token on hand.
Neither is how most bank APIs expect you to integrate, and it does mean
your service needs to hold your login password in a place your own backend
can read it. We’re calling this out explicitly rather than letting you
discover it the first time a long-running job 401s at 2am.
Onboarding, the wallet endpoints, webhooks, and partner settings still only
accept the login JWT. A key sent to those routes is rejected. The key is
scoped to the environment it was issued for.
Sandbox vs. live tokens
Your account has one environment setting (sandbox or live), switched
with Switch Environment. A
token is valid regardless of environment — it’s the account-level
environment field that decides which ledger your service calls hit, not
the token itself. See Sandbox vs. Live for the
full picture.
Two-factor authentication
You can require a second factor on login via
Toggle Two-Factor Authentication.
This reference doesn’t yet cover the 2FA challenge flow in detail — if
you’ve enabled it, reach out to support for the exact request shape.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rex BaaS","description":"Banking-as-a-Service API documentation for Rex partners","colors":{"primary":"#0D5C63","light":"#1AA6B7","dark":"#0D5C63"},"favicon":"https://mintcdn.com/rexbaas-docs/80UqrjPnTVEiSw4p/favicon.svg?fit=max\u0026auto=format\u0026n=80UqrjPnTVEiSw4p\u0026q=85\u0026s=ab35ea7964a0f47a0da967a5a6c3a36d","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Partner Dashboard","href":"https://partners.rexmfbank.com"}},"footer":{"socials":{}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rexbaas-docs","hasAudioNarration":false,"actualSubdomain":"rexbaas-docs","customDomains":["baas-api-docs.rexmfbank.com"],"gitSource":{"type":"github","owner":"rexmfbank","repo":"rexbaasdocs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ab5060654e19fa590b3bf6a","clientVersion":"0.0.4131","searchFilterCounts":[{"language":"default","tag":"API Reference","count":120},{"language":"default","tag":"Guides","count":15},{"language":"default","tag":"Virtual Accounts","count":13},{"language":"default","tag":"Bills Payment","count":11},{"language":"default","tag":"Authentication","count":10},{"language":"default","tag":"Partner Settings","count":10},{"language":"default","tag":"Onboarding","count":8},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Get Started","count":4},{"language":"default","tag":"Services","count":2}]},"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":"custom-rbac-roles","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":"rbac-expansion","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":"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":"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":"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":"editor-metadata","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},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"How to authenticate requests to the Rex BaaS API","href":"/authentication"},"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: \"How to authenticate requests to the Rex BaaS API\"\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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Every authenticated endpoint expects a bearer token:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer \u003ctoken>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`getting-a-token`,children:`Getting a token`}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/authentication/log-in`,children:`Login`}),` with the email and\npassword you registered with:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,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.rexmfbank.com/baas/api/v1/client/onboarding/login`}),_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:` '{\"email\": \"[email protected]\", \"password\": \"correct-horse-battery-staple\"}'`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:`#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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Login successful.\"`}),_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:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...\"`}),_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:`7200`}),_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:` \"environment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sandbox\"`})]}),`\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`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`data.token`}),` as the bearer credential on onboarding, wallet, webhook,\nand partner-settings calls. Service endpoints — virtual accounts, transfers,\n`,_jsx(_components.a,{href:`/guides/bills-payment`,children:`bills payment`}),`, and\n`,_jsx(_components.a,{href:`/guides/service-subscriptions`,children:`subscriptions`}),` — accept this token `,_jsx(_components.strong,{children:`or`}),`\nan API key. See below.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This login token expires. For a long-running service integration, prefer\nan API key on the service endpoints rather than re-logging in. Onboarding\nand settings still require this token.`})}),`\n`,_jsx(Heading,{level:`2`,id:`token-lifetime-—-read-this-before-you-integrate`,children:`Token lifetime — read this before you integrate`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`expires_in`}),` is seconds, and today that’s `,_jsx(_components.strong,{children:`7200 (2 hours)`}),` by default. There\nis no refresh-token endpoint. When a token expires, requests fail with\n`,_jsx(_components.code,{children:`401 Unauthenticated`}),` and the only way to get a new one is to call\n`,_jsx(_components.a,{href:`/api-reference/authentication/log-in`,children:`Login`}),` again with your email and password.`]}),`\n`,_jsxs(_components.p,{children:[`For a quick dashboard session this is normal. For a `,_jsx(_components.strong,{children:`server-to-server\nintegration that only calls service endpoints`}),`, use an API key instead —\nit does not expire on this 2-hour clock. If you are calling onboarding,\nwallet, webhooks, or partner settings unattended, your backend needs one of:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`a small wrapper that catches `,_jsx(_components.code,{children:`401`}),`s and transparently re-authenticates\nwith a stored email/password before retrying, or`]}),`\n`,_jsx(_components.li,{children:`a scheduled re-login every ~90 minutes to keep a warm token on hand.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Neither is how most bank APIs expect you to integrate, and it does mean\nyour service needs to hold your login password in a place your own backend\ncan read it. We’re calling this out explicitly rather than letting you\ndiscover it the first time a long-running job 401s at 2am.`}),`\n`,_jsx(Heading,{level:`2`,id:`api-keys`,children:`API keys`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/authentication/issue-an-api-key`,children:`Issue an API Key`}),` returns an\n`,_jsx(_components.code,{children:`sk_live_...`}),` / `,_jsx(_components.code,{children:`sk_sandbox_...`}),` secret. Service endpoints accept either the\nlogin JWT or this key — virtual accounts, `,_jsx(_components.a,{href:`/guides/bills-payment`,children:`bills payment`}),`,\nand `,_jsx(_components.a,{href:`/guides/service-subscriptions`,children:`service subscriptions`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer sk_live_...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Onboarding, the wallet endpoints, webhooks, and partner settings still only\naccept the login JWT. A key sent to those routes is rejected. The key is\nscoped to the environment it was issued for.`}),`\n`,_jsx(Heading,{level:`2`,id:`sandbox-vs-live-tokens`,children:`Sandbox vs. live tokens`}),`\n`,_jsxs(_components.p,{children:[`Your account has one `,_jsx(_components.code,{children:`environment`}),` setting (`,_jsx(_components.code,{children:`sandbox`}),` or `,_jsx(_components.code,{children:`live`}),`), switched\nwith `,_jsx(_components.a,{href:`/api-reference/onboarding/switch-environment`,children:`Switch Environment`}),`. A\ntoken is valid regardless of environment — it’s the account-level\n`,_jsx(_components.code,{children:`environment`}),` field that decides which ledger your service calls hit, not\nthe token itself. See `,_jsx(_components.a,{href:`/guides/sandbox-vs-live`,children:`Sandbox vs. Live`}),` for the\nfull picture.`]}),`\n`,_jsx(Heading,{level:`2`,id:`two-factor-authentication`,children:`Two-factor authentication`}),`\n`,_jsxs(_components.p,{children:[`You can require a second factor on login via\n`,_jsx(_components.a,{href:`/api-reference/partner-settings/enable-or-disable-two-factor-authentication`,children:`Toggle Two-Factor Authentication`}),`.\nThis reference doesn’t yet cover the 2FA challenge flow in detail — if\nyou’ve enabled it, reach out to support for the exact request shape.`]})]})}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":"Authentication","description":"How to authenticate requests to the Rex BaaS API","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Getting a token","slug":"getting-a-token","depth":2,"children":[]},{"title":"Token lifetime — read this before you integrate","slug":"token-lifetime-—-read-this-before-you-integrate","depth":2,"children":[]},{"title":"API keys","slug":"api-keys","depth":2,"children":[]},{"title":"Sandbox vs. live tokens","slug":"sandbox-vs-live-tokens","depth":2,"children":[]},{"title":"Two-factor authentication","slug":"two-factor-authentication","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rexbaas-docs","siteName":"Rex BaaS","title":"Authentication - Rex BaaS","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-24T11:14:20.486Z","originalFileLocation":"authentication.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=\"How to authenticate requests to the Rex BaaS API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rex BaaS\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Rex BaaS\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to authenticate requests to the Rex BaaS API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rex BaaS\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://baas-api-docs.rexmfbank.com/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rexbaas-docs.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+requests+to+the+Rex+BaaS+API\u0026amp;theme=d8b1c25f5d53c4e231a3cd5c\u0026amp;signature=53ed78cafc1af81e0bce0b330c8d5e4bf0711c8dfa58992d570345f54d82cfd0\">\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=\"Authentication - Rex BaaS\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to authenticate requests to the Rex BaaS API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rexbaas-docs.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+requests+to+the+Rex+BaaS+API\u0026amp;theme=d8b1c25f5d53c4e231a3cd5c\u0026amp;signature=53ed78cafc1af81e0bce0b330c8d5e4bf0711c8dfa58992d570345f54d82cfd0\">\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/rexbaas-docs/l2Mr72sJ4oS8eUAY/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rex BaaS\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D5C63\">\u003clink data-mint-head rel=\"canonical\" href=\"https://baas-api-docs.rexmfbank.com/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://baas-api-docs.rexmfbank.com/#organization\",\"name\":\"Rex BaaS\",\"url\":\"https://baas-api-docs.rexmfbank.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://baas-api-docs.rexmfbank.com#website\",\"name\":\"Rex BaaS\",\"url\":\"https://baas-api-docs.rexmfbank.com\",\"publisher\":{\"@id\":\"https://baas-api-docs.rexmfbank.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://baas-api-docs.rexmfbank.com/authentication#webpage\",\"url\":\"https://baas-api-docs.rexmfbank.com/authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate requests to the Rex BaaS API\",\"dateModified\":\"2026-09-24T11:14:20.486Z\",\"isPartOf\":{\"@id\":\"https://baas-api-docs.rexmfbank.com#website\"},\"breadcrumb\":{\"@id\":\"https://baas-api-docs.rexmfbank.com/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://baas-api-docs.rexmfbank.com/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get Started\",\"item\":\"https://baas-api-docs.rexmfbank.com/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://baas-api-docs.rexmfbank.com/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://baas-api-docs.rexmfbank.com/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate requests to the Rex BaaS API\",\"url\":\"https://baas-api-docs.rexmfbank.com/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://baas-api-docs.rexmfbank.com/authentication#webpage\"},\"dateModified\":\"2026-09-24T11:14:20.486Z\",\"publisher\":{\"@id\":\"https://baas-api-docs.rexmfbank.com/#organization\"},\"isPartOf\":{\"@id\":\"https://baas-api-docs.rexmfbank.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rex BaaS\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Rex BaaS\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"Rex BaaS","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Get Started","pages":[{"title":"Introduction","description":"Get started with the Rex Banking-as-a-Service API","href":"/introduction"},{"title":"Authentication","href":"/authentication"},{"title":"Errors","description":"The shared response and error shape used by every endpoint","href":"/errors"},{"title":"Rate Limits","href":"/rate-limits"}]},{"group":"Webhooks","pages":[{"title":"Webhooks Overview","href":"/webhooks/overview"},{"title":"Webhook Events","href":"/webhooks/events"},{"title":"Verifying Webhook Signatures","href":"/webhooks/signature-verification"}]},{"group":"Guides","pages":[{"title":"Going Live Checklist","href":"/guides/going-live-checklist"},{"title":"Sandbox vs. Live","href":"/guides/sandbox-vs-live"},{"title":"Service subscriptions","href":"/guides/service-subscriptions"},{"title":"Bills Payment","href":"/guides/bills-payment"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/authentication/register-a-partner-account"}]}]},"basePath":"","title":"Authentication - Rex BaaS","buildId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","deploymentId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","dynamics":[],"chunks":[]}