OTPBay stores only a hash of the key, so it can’t show the key again. If you lose a key, create a new one and delete the old one.
Keep API keys on your server. Never put them in a mobile app, browser code or a public repository — anyone with the key can send messages on your balance.
Check a key
Call Get project to confirm a key works and see the balance it spends from:
Turn on the IP allowlist to accept API requests only from your servers. Open Settings in the dashboard, turn on Restrict API keys to these addresses and add up to 50 IPv4 or IPv6 addresses.With the allowlist on, a request from any other address fails with 403 IP_NOT_ALLOWED, even with a valid key. The allowlist applies to every API key in the project.
Authentication errors
Status
Code
Meaning
401
MISSING_API_KEY
The Authorization: Bearer header is missing.
401
INVALID_API_KEY
The key doesn’t exist or was deleted.
403
IP_NOT_ALLOWED
The IP allowlist is on and your address isn’t in it.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OTPBay","description":"One API for OTP verification over Telegram and SMS, with automatic SMS fallback and pay-as-you-go pricing.","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#1D4ED8"},"logo":{"light":"https://mintcdn.com/otplabs/8X-9M4_TQPcbQN7P/logo/light.svg?fit=max\u0026auto=format\u0026n=8X-9M4_TQPcbQN7P\u0026q=85\u0026s=6b4b1e93ed9af2e6c96dc1b134c943b4","dark":"https://mintcdn.com/otplabs/8X-9M4_TQPcbQN7P/logo/dark.svg?fit=max\u0026auto=format\u0026n=8X-9M4_TQPcbQN7P\u0026q=85\u0026s=5485971997fc4eec1bf90a275f2ee143","href":"https://otpbay.com"},"favicon":"https://mintcdn.com/otplabs/8X-9M4_TQPcbQN7P/favicon.svg?fit=max\u0026auto=format\u0026n=8X-9M4_TQPcbQN7P\u0026q=85\u0026s=af1cf27822fe713b72449abc797087c5","api":{"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["bash","javascript","python","php","go","java","ruby","csharp"],"prefill":true}},"navbar":{"links":[{"href":"mailto:hello@otpbay.com","label":"Support"}],"primary":{"type":"button","label":"Get an API key","href":"https://app.otpbay.com/login"}},"footer":{"links":[{"header":"OTPBay","items":[{"label":"Website","href":"https://otpbay.com"},{"label":"Dashboard","href":"https://app.otpbay.com"},{"label":"Contact","href":"mailto:hello@otpbay.com"}]}]},"seo":{"metatags":{"og:site_name":"OTPBay Docs"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.otpbay.com"},{"anchor":"Pricing","icon":"tag","href":"https://otpbay.com/#pricing"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"otplabs","hasAudioNarration":false,"actualSubdomain":"otplabs","customDomains":["docs.otpbay.com"],"gitSource":{"type":"github","owner":"sarkarkurdish","repo":"otpbay-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ab8101293ea6a921de40041","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"API reference","count":11},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Concepts","count":4},{"language":"default","tag":"Telegram","count":3},{"language":"default","tag":"Verify","count":3},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Channels","count":3},{"language":"default","tag":"SMS","count":2},{"language":"default","tag":"Overview","count":1},{"language":"default","tag":"Project","count":1}]},"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":"site-roles","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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate API requests with a project API key and restrict them to your servers' IP addresses.","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: \"Authenticate API requests with a project API key and restrict them to your servers’ IP addresses.\"\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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every request to `,_jsx(_components.code,{children:`https://api.otpbay.com/v1`}),` needs a project API key in the `,_jsx(_components.code,{children:`Authorization`}),` header:`]}),`\n`,_jsx(CodeBlock,{filename:``,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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.otpbay.com/v1/project`}),_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:` \"Authorization: Bearer otp_live_...\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`An API key belongs to one project. Everything you send with it is billed to that project’s balance, and you can only read messages that project sent.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-an-api-key`,children:`Create an API key`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the `,_jsx(_components.a,{href:`https://app.otpbay.com`,children:`dashboard`}),`, open the project.`]}),`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`API Keys`}),` and click `,_jsx(_components.strong,{children:`New API key`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Copy the key. It starts with `,_jsx(_components.code,{children:`otp_live_`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`OTPBay stores only a hash of the key, so it can’t show the key again. If you lose a key, create a new one and delete the old one.`})}),`\n`,_jsx(_components.p,{children:`Keep API keys on your server. Never put them in a mobile app, browser code or a public repository — anyone with the key can send messages on your balance.`}),`\n`,_jsx(Heading,{level:`2`,id:`check-a-key`,children:`Check a key`}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/project/get`,children:`Get project`}),` to confirm a key works and see the balance it spends from:`]}),`\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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6650c1f2a9b3e4d5f6a7b8c9\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme production\"`}),_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:` \"balance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24.37`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`restrict-keys-to-your-ip-addresses`,children:`Restrict keys to your IP addresses`}),`\n`,_jsxs(_components.p,{children:[`Turn on the IP allowlist to accept API requests only from your servers. Open `,_jsx(_components.strong,{children:`Settings`}),` in the dashboard, turn on `,_jsx(_components.strong,{children:`Restrict API keys to these addresses`}),` and add up to 50 IPv4 or IPv6 addresses.`]}),`\n`,_jsxs(_components.p,{children:[`With the allowlist on, a request from any other address fails with `,_jsx(_components.code,{children:`403 IP_NOT_ALLOWED`}),`, even with a valid key. The allowlist applies to every API key in the project.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-errors`,children:`Authentication errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`MISSING_API_KEY`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`Authorization: Bearer`}),` header is missing.`]})]}),_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_API_KEY`})}),_jsx(_components.td,{children:`The key doesn’t exist or was deleted.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`IP_NOT_ALLOWED`})}),_jsx(_components.td,{children:`The IP allowlist is on and your address isn’t in it.`})]})]})]})]})}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":"Authenticate API requests with a project API key and restrict them to your servers' IP addresses.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create an API key","slug":"create-an-api-key","depth":2,"children":[]},{"title":"Check a key","slug":"check-a-key","depth":2,"children":[]},{"title":"Restrict keys to your IP addresses","slug":"restrict-keys-to-your-ip-addresses","depth":2,"children":[]},{"title":"Authentication errors","slug":"authentication-errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"otplabs","siteName":"OTPBay","title":"Authentication - OTPBay","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-26T18:33:58.235Z","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=\"Authenticate API requests with a project API key and restrict them to your servers\u0026#x27; IP addresses.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OTPBay\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_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/otplabs/m_RD1oW66WwT2cnl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - OTPBay\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate API requests with a project API key and restrict them to your servers\u0026#x27; IP addresses.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OTPBay Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.otpbay.com/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://otplabs.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=Authenticate+API+requests+with+a+project+API+key+and+restrict+them+to+your+servers%27+IP+addresses.\u0026amp;theme=e356ee5661d14dccab2560c7\u0026amp;signature=fca1d6bca494fe1c69dc37ac91f8a33c9405dea2ab30fd0dd50727cff0a6e442\">\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 - OTPBay\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate API requests with a project API key and restrict them to your servers\u0026#x27; IP addresses.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://otplabs.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=Authenticate+API+requests+with+a+project+API+key+and+restrict+them+to+your+servers%27+IP+addresses.\u0026amp;theme=e356ee5661d14dccab2560c7\u0026amp;signature=fca1d6bca494fe1c69dc37ac91f8a33c9405dea2ab30fd0dd50727cff0a6e442\">\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/otplabs/m_RD1oW66WwT2cnl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OTPBay\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.otpbay.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://docs.otpbay.com/#organization\",\"name\":\"OTPBay\",\"url\":\"https://docs.otpbay.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/otplabs/8X-9M4_TQPcbQN7P/logo/light.svg?fit=max\u0026auto=format\u0026n=8X-9M4_TQPcbQN7P\u0026q=85\u0026s=6b4b1e93ed9af2e6c96dc1b134c943b4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.otpbay.com#website\",\"name\":\"OTPBay\",\"url\":\"https://docs.otpbay.com\",\"publisher\":{\"@id\":\"https://docs.otpbay.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.otpbay.com/authentication#webpage\",\"url\":\"https://docs.otpbay.com/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate API requests with a project API key and restrict them to your servers' IP addresses.\",\"dateModified\":\"2026-09-26T18:33:58.235Z\",\"isPartOf\":{\"@id\":\"https://docs.otpbay.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.otpbay.com/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.otpbay.com/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.otpbay.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.otpbay.com/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.otpbay.com/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate API requests with a project API key and restrict them to your servers' IP addresses.\",\"url\":\"https://docs.otpbay.com/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.otpbay.com/authentication#webpage\"},\"dateModified\":\"2026-09-26T18:33:58.235Z\",\"publisher\":{\"@id\":\"https://docs.otpbay.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.otpbay.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OTPBay\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OTPBay\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"OTPBay","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.otpbay.com"},{"anchor":"Pricing","icon":"tag","href":"https://otpbay.com/#pricing"}]},"tabs":[{"tab":"Guides","icon":"book-open","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","description":"Send a one-time code to a phone number and check it with the Verify API.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Channels","pages":[{"title":"Verify","description":"Verify phone numbers with one-time codes. OTPBay generates the code, delivers it over Telegram or SMS, and checks it.","href":"/guides/verify"},{"title":"SMS","href":"/guides/sms"},{"title":"Telegram","href":"/guides/telegram"}]},{"group":"Concepts","pages":[{"title":"Webhooks","href":"/webhooks"},{"title":"Errors","href":"/errors"},{"title":"Billing","href":"/billing"},{"title":"IDs and formats","href":"/concepts/formats"}]}]},{"tab":"API reference","icon":"square-terminal","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Authentication - OTPBay","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}