Authenticate MOJA API requests using Basic Auth or an access token.
All MOJA API requests require authentication. Use HTTP Basic Authentication (API Key and Secret) or pass an access token in the Authorization header.Use one method per request — not both.
Generate credentials
Navigate to MOJA → API Setup in the Beem dashboard and generate your API Key and Secret.
Your API Secret is displayed only once. Store it securely, as it cannot be viewed again.
Authentication methods
API Key & Secret
Access Token
Header
Value
Authorization
Basic base64(api_key:secret_key)
Content-Type
application/json
Username: API Key
Password: API Secret
POST /v1/chatapi HTTP/1.1Host: apichatcore.beem.africaAuthorization: Basic <base64-encoded-api_key:secret_key>Content-Type: application/json
Header
Value
Authorization
<access-token>
Content-Type
application/json
Pass your access token directly — do not use a Bearer prefix.
POST /v1/chatapi HTTP/1.1Host: apichatcore.beem.africaAuthorization: <access-token>Content-Type: application/json
Never expose your API Key, API Secret, or access token in frontend applications or public repositories.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Beem API","colors":{"primary":"#33B1BA","light":"#54C5CF","dark":"#278991"},"logo":{"light":"https://mintcdn.com/beem-996d8f1d/kow37oXzRv3nwEZo/logo/light-logo.png?fit=max\u0026auto=format\u0026n=kow37oXzRv3nwEZo\u0026q=85\u0026s=e31266482f0b7ad162cc7755268d0619","dark":"https://mintcdn.com/beem-996d8f1d/kow37oXzRv3nwEZo/logo/light-logo.png?fit=max\u0026auto=format\u0026n=kow37oXzRv3nwEZo\u0026q=85\u0026s=e31266482f0b7ad162cc7755268d0619"},"favicon":"https://mintcdn.com/beem-996d8f1d/kow37oXzRv3nwEZo/favicon.png?fit=max\u0026auto=format\u0026n=kow37oXzRv3nwEZo\u0026q=85\u0026s=5d080ee62f1e1bdf86f2f509d5d1d48a","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:support@beem.africa","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://login.beem.africa/"}},"footer":{"socials":{"x":"https://x.com/BeemAfrica","github":"https://github.com/beem-africa","linkedin":"https://www.linkedin.com/company/beem-africa"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://beem.africa/beem-api"},{"anchor":"Blog","icon":"newspaper","href":"https://beem.africa/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"beem-996d8f1d","hasAudioNarration":false,"actualSubdomain":"beem-996d8f1d","customDomains":["docs.beem.africa"],"gitSource":{"type":"github","owner":"beem-africa","repo":"bm-apidocs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae1f97a201cdb70a5225a69","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"APIs","count":120},{"language":"default","tag":"API Reference","count":34},{"language":"default","tag":"SMS","count":18},{"language":"default","tag":"Contacts","count":16},{"language":"default","tag":"Multicountry SMS","count":14},{"language":"default","tag":"Airtime","count":12},{"language":"default","tag":"MOJA Broadcast API","count":12},{"language":"default","tag":"Payments Checkout","count":11},{"language":"default","tag":"OTP","count":9},{"language":"default","tag":"Payments Collection","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"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}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"guides/moja/authentication","slug":"/guides/moja/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate MOJA API requests using Basic Auth or an access token.","href":"/guides/moja/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 MOJA API requests using Basic Auth or 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={code:`code`,hr:`hr`,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,Heading,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`All MOJA API requests require authentication. Use `,_jsx(_components.strong,{children:`HTTP Basic Authentication`}),` (API Key and Secret) or pass an `,_jsx(_components.strong,{children:`access token`}),` in the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(_components.p,{children:`Use one method per request — not both.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`generate-credentials`,children:`Generate credentials`}),`\n`,_jsxs(_components.p,{children:[`Navigate to `,_jsx(_components.strong,{children:`MOJA → API Setup`}),` in the Beem dashboard and generate your API Key and Secret.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Your API Secret is displayed `,_jsx(_components.strong,{children:`only once`}),`. Store it securely, as it cannot be viewed again.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-methods`,children:`Authentication methods`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`API Key \u0026 Secret`,id:`api-key-%26-secret`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Basic base64(api_key:secret_key)`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Username:`}),` API Key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Password:`}),` API Secret`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/chatapi `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apichatcore.beem.africa`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Basic \u003cbase64-encoded-api_key:secret_key>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Access Token`,id:`access-token`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\u003caccess-token>`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]})]})]}),_jsxs(_components.p,{children:[`Pass your access token directly — `,_jsx(_components.strong,{children:`do not`}),` use a `,_jsx(_components.code,{children:`Bearer`}),` prefix.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v1/chatapi `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Host`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apichatcore.beem.africa`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003caccess-token>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Content-Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` application/json`})]}),`\n`]})})})]})]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never expose your API Key, API Secret, or access token in frontend applications or public repositories.`})})]})}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 MOJA API requests using Basic Auth or an access token.","href":"/guides/moja/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Generate credentials","slug":"generate-credentials","depth":2,"children":[]},{"title":"Authentication methods","slug":"authentication-methods","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/beem-996d8f1d/c278b725fff1a6bf/scripts/lib/openapi-sync.js","/_mintlify/custom/beem-996d8f1d/c5939f0d94af4f52/scripts/openapi-extensions/airtime.js","/_mintlify/custom/beem-996d8f1d/ebb89ae694e90022/scripts/openapi-extensions/moja.js","/_mintlify/custom/beem-996d8f1d/df9b54f4510d89f1/scripts/openapi-extensions/payments-collection.js","/_mintlify/custom/beem-996d8f1d/148bec60adf6ecc0/scripts/openapi-extensions/ussd.js","/_mintlify/custom/beem-996d8f1d/58b21da6ecd1f697/scripts/sync-airtime-openapi.js","/_mintlify/custom/beem-996d8f1d/b9ddc273568fd95f/scripts/sync-contact-openapi.js","/_mintlify/custom/beem-996d8f1d/e99747e86d58faf9/scripts/sync-moja-openapi.js","/_mintlify/custom/beem-996d8f1d/cadfe9595773fe9d/scripts/sync-otp-openapi.js","/_mintlify/custom/beem-996d8f1d/ce905b345def6f52/scripts/sync-payments-checkout-openapi.js","/_mintlify/custom/beem-996d8f1d/7c3d9adab8e85dd2/scripts/sync-payments-collection-openapi.js","/_mintlify/custom/beem-996d8f1d/c040a2f459024bd0/scripts/sync-sms-openapi.js","/_mintlify/custom/beem-996d8f1d/ec431d9e8ea1d64a/scripts/sync-ussd-openapi.js","/_mintlify/custom/beem-996d8f1d/31efed33c81bba73/scripts/openapi-extensions/multicountry-sms.js","/_mintlify/custom/beem-996d8f1d/7e3c74cf17e019f7/scripts/sync-multicountry-sms-openapi.js"],"subdomain":"beem-996d8f1d","siteName":"Beem API","title":"Authentication - Beem API","contextualStarterQuestions":[{"_id":"6a99677bee59f0ae7f4b8c39","deploymentId":"6a561c0d903636dd707b6938","questionText":"How do I authenticate requests?","status":"active","generatedBy":"contextual","path":"guides/moja/authentication","createdAt":"2026-09-03T12:26:35.600Z","updatedAt":"2026-09-03T12:26:35.600Z","__v":0},{"_id":"6a99677bee59f0ae7f4b8c38","deploymentId":"6a561c0d903636dd707b6938","questionText":"How do I generate API credentials?","status":"active","generatedBy":"contextual","path":"guides/moja/authentication","createdAt":"2026-09-03T12:26:35.600Z","updatedAt":"2026-09-03T12:26:35.600Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-06T10:25:59.334Z","originalFileLocation":"guides/moja/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 MOJA API requests using Basic Auth or an access token.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Beem 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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_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/beem-996d8f1d/-RszeSbq19Bthawt/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Beem API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate MOJA API requests using Basic Auth or an access token.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Beem API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.beem.africa/guides/moja/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://beem-996d8f1d.mintlify.site/_mintlify/api/og/v2?division=MOJA+Chat+API\u0026amp;title=Authentication\u0026amp;description=Authenticate+MOJA+API+requests+using+Basic+Auth+or+an+access+token.\u0026amp;theme=13a41f58bb3fa22637ceba42\u0026amp;signature=1b46ca05f6b8fb2a0f9a9a868415fff03e33e24015f71903f335fad5ea20bd3f\">\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 - Beem API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate MOJA API requests using Basic Auth or an access token.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://beem-996d8f1d.mintlify.site/_mintlify/api/og/v2?division=MOJA+Chat+API\u0026amp;title=Authentication\u0026amp;description=Authenticate+MOJA+API+requests+using+Basic+Auth+or+an+access+token.\u0026amp;theme=13a41f58bb3fa22637ceba42\u0026amp;signature=1b46ca05f6b8fb2a0f9a9a868415fff03e33e24015f71903f335fad5ea20bd3f\">\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/beem-996d8f1d/-RszeSbq19Bthawt/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Beem API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#33B1BA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.beem.africa/guides/moja/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/moja/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.beem.africa/#organization\",\"name\":\"Beem API\",\"url\":\"https://docs.beem.africa\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/beem-996d8f1d/kow37oXzRv3nwEZo/logo/light-logo.png?fit=max\u0026auto=format\u0026n=kow37oXzRv3nwEZo\u0026q=85\u0026s=e31266482f0b7ad162cc7755268d0619\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.beem.africa#website\",\"name\":\"Beem API\",\"url\":\"https://docs.beem.africa\",\"publisher\":{\"@id\":\"https://docs.beem.africa/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.beem.africa/guides/moja/authentication#webpage\",\"url\":\"https://docs.beem.africa/guides/moja/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate MOJA API requests using Basic Auth or an access token.\",\"dateModified\":\"2026-08-06T10:25:59.334Z\",\"isPartOf\":{\"@id\":\"https://docs.beem.africa#website\"},\"breadcrumb\":{\"@id\":\"https://docs.beem.africa/guides/moja/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.beem.africa/guides/moja/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"APIs\",\"item\":\"https://docs.beem.africa/guides/sms\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MOJA Chat API\",\"item\":\"https://docs.beem.africa/guides/moja\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Authentication\",\"item\":\"https://docs.beem.africa/guides/moja/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.beem.africa/guides/moja/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate MOJA API requests using Basic Auth or an access token.\",\"url\":\"https://docs.beem.africa/guides/moja/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.beem.africa/guides/moja/authentication#webpage\"},\"dateModified\":\"2026-08-06T10:25:59.334Z\",\"publisher\":{\"@id\":\"https://docs.beem.africa/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.beem.africa#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Beem API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Beem API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/moja/authentication.md","siteName":"Beem API","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://beem.africa/beem-api"},{"anchor":"Blog","icon":"newspaper","href":"https://beem.africa/blog"}]},"groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/index"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"APIs","pages":[{"group":"SMS","expanded":false,"pages":[{"title":"Introduction","href":"/guides/sms/index"},{"title":"Prerequisites","href":"/guides/sms/prerequisites"},{"title":"Authentication","href":"/guides/sms/authentication"},{"title":"Sender ID registration","href":"/guides/sms/sender-id"},{"title":"Sending flow","href":"/guides/sms/sending-flow"},{"title":"Delivery reports","href":"/guides/sms/delivery-reports"},{"title":"Monitoring \u0026 API logs","href":"/guides/sms/monitoring"},{"title":"API responses","href":"/guides/sms/api-responses"},{"title":"API lifecycle","href":"/guides/sms/api-lifecycle"},{"title":"Security","href":"/guides/sms/security"},{"group":"API Reference","pages":[{"title":"Send SMS","deprecated":null,"version":null,"openapi":"/openapi/sms.json post /v1/send","href":"/api-reference/send-sms"},{"title":"Get vendor balance","deprecated":null,"version":null,"openapi":"/openapi/sms.json get /public/v1/vendors/balance","href":"/api-reference/get-vendor-balance"},{"title":"Get delivery reports","deprecated":null,"version":null,"openapi":"/openapi/sms.json get /public/v1/delivery-reports","href":"/api-reference/get-delivery-reports"},{"title":"List sender names","deprecated":null,"version":null,"openapi":"/openapi/sms.json get /public/v1/sender-names","href":"/api-reference/list-sender-names"},{"title":"List SMS templates","deprecated":null,"version":null,"openapi":"/openapi/sms.json get /public/v1/sms-templates","href":"/api-reference/list-sms-templates"},{"title":"Create SMS template","deprecated":null,"version":null,"openapi":"/openapi/sms.json post /public/v1/sms-templates","href":"/api-reference/create-sms-template"},{"title":"Update SMS template","deprecated":null,"version":null,"openapi":"/openapi/sms.json put /public/v1/sms-templates/{sms_template_id}","href":"/api-reference/update-sms-template"},{"title":"Delete SMS template","deprecated":null,"version":null,"openapi":"/openapi/sms.json delete /public/v1/sms-templates/{sms_template_id}","href":"/api-reference/delete-sms-template"}]}]},{"group":"Multicountry SMS","expanded":false,"pages":[{"title":"Introduction","href":"/guides/multicountry-sms/index"},{"title":"Prerequisites","href":"/guides/multicountry-sms/prerequisites"},{"title":"Message encoding","href":"/guides/multicountry-sms/message-encoding"},{"title":"Sending messages","href":"/guides/multicountry-sms/sending-messages"},{"title":"API responses","href":"/guides/multicountry-sms/api-responses"},{"title":"Throughput \u0026 connections","href":"/guides/multicountry-sms/throughput"},{"title":"Delivery reports","href":"/guides/multicountry-sms/delivery-reports"},{"title":"Inbound two-way SMS","href":"/guides/multicountry-sms/inbound-two-way"},{"title":"Parameters reference","href":"/guides/multicountry-sms/parameters"},{"group":"API Reference","pages":[{"title":"Send message","deprecated":null,"version":null,"openapi":"/openapi/multicountry-sms.json post /bin/send","href":"/api-reference/send-message"},{"title":"Send message (JSON response)","deprecated":null,"version":null,"openapi":"/openapi/multicountry-sms.json post /send.json","href":"/api-reference/send-message-json-response"},{"title":"Send message (XML response)","deprecated":null,"version":null,"openapi":"/openapi/multicountry-sms.json post /bin/send.xml","href":"/api-reference/send-message-xml-response"},{"title":"Check balance","deprecated":null,"version":null,"openapi":"/openapi/multicountry-sms.json get /api/userAccountBalance","href":"/api-reference/check-balance"},{"title":"Receive inbound message or DLR","deprecated":null,"version":null,"openapi":"/openapi/multicountry-sms.json post /callback","href":"/api-reference/receive-inbound-message-or-dlr"}]}]},{"group":"SMPP","expanded":false,"pages":[{"title":"SMPP integration","href":"/guides/multicountry-sms/smpp"},{"title":"SMPP error codes","href":"/guides/multicountry-sms/smpp-error-codes"}]},{"group":"Two Way SMS","expanded":false,"pages":[{"title":"Introduction","href":"/guides/two-way-sms/index"},{"title":"Prerequisites","href":"/guides/two-way-sms/prerequisites"},{"title":"Inbound callbacks","href":"/guides/two-way-sms/inbound-callbacks"},{"title":"Security","href":"/guides/two-way-sms/security"}]},{"group":"Contacts","expanded":false,"pages":[{"title":"Introduction","href":"/guides/contact/index"},{"title":"Prerequisites","href":"/guides/contact/prerequisites"},{"title":"Authentication","href":"/guides/contact/authentication"},{"title":"Address books","href":"/guides/contact/address-books"},{"title":"Contacts","href":"/guides/contact/contacts"},{"title":"Search and filtering","href":"/guides/contact/search-and-filtering"},{"title":"API responses","href":"/guides/contact/api-responses"},{"title":"Best practices","href":"/guides/contact/best-practices"},{"group":"API Reference","pages":[{"title":"List address books","deprecated":null,"version":null,"openapi":"/openapi/contact.json get /address-books","href":"/api-reference/list-address-books"},{"title":"Create address book","deprecated":null,"version":null,"openapi":"/openapi/contact.json post /address-books","href":"/api-reference/create-address-book"},{"title":"Update address book","deprecated":null,"version":null,"openapi":"/openapi/contact.json put /address-books/{addressbook_id}","href":"/api-reference/update-address-book"},{"title":"Delete address book","deprecated":null,"version":null,"openapi":"/openapi/contact.json delete /address-books/{addressbook_id}","href":"/api-reference/delete-address-book"},{"title":"List contacts","deprecated":null,"version":null,"openapi":"/openapi/contact.json get /contacts","href":"/api-reference/list-contacts"},{"title":"Create contact","deprecated":null,"version":null,"openapi":"/openapi/contact.json post /contacts","href":"/api-reference/create-contact"},{"title":"Update contact","deprecated":null,"version":null,"openapi":"/openapi/contact.json put /contacts/{contact_id}","href":"/api-reference/update-contact"},{"title":"Delete contact","deprecated":null,"version":null,"openapi":"/openapi/contact.json delete /contacts/{contact_id}","href":"/api-reference/delete-contact"}]}]},{"group":"MOJA Chat API","expanded":false,"pages":[{"title":"Introduction","href":"/guides/moja/index"},{"title":"Prerequisites","description":"Create a Beem account, set up a Moja channel, and obtain API credentials.","href":"/guides/moja/prerequisites"},{"title":"Authentication","href":"/guides/moja/authentication"},{"title":"Active sessions","description":"List users with open MOJA chat sessions before sending session messages.","href":"/guides/moja/active-sessions"},{"title":"Send session message","href":"/guides/moja/send-session-message"},{"title":"Inbound callbacks","href":"/guides/moja/inbound-callbacks"},{"title":"API responses","href":"/guides/moja/api-responses"},{"title":"Get active sessions","deprecated":null,"version":null,"openapi":"/openapi/moja.json get /v1/chatapi/active-users","href":"/api-reference/moja/conversations/get-active-sessions"},{"title":"Send session message","deprecated":null,"version":null,"openapi":"/openapi/moja.json post /v1/chatapi","href":"/api-reference/moja/conversations/send-session-message"},{"title":"Receive a message","deprecated":null,"version":null,"openapi":"/openapi/moja.json post /callback","href":"/api-reference/moja/conversations/receive-a-message"}]},{"group":"MOJA Broadcast API","expanded":false,"pages":[{"title":"Prerequisites","description":"Create a Beem account, set up a Moja channel, and obtain API credentials.","href":"/guides/moja/prerequisites"},{"title":"Authentication","href":"/guides/moja/authentication"},{"title":"WhatsApp templates","description":"Pre-approved WhatsApp message templates for initiating or re-engaging customer conversations.","href":"/guides/moja/whatsapp-templates"},{"title":"Template categories","href":"/guides/moja/template-categories"},{"title":"Request a template","href":"/guides/moja/requesting-templates"},{"title":"Retrieve templates","href":"/guides/moja/retrieve-templates"},{"title":"Send template message","href":"/guides/moja/send-template"},{"title":"Delivery reports","href":"/guides/moja/delivery-reports"},{"title":"API responses","href":"/guides/moja/api-responses"},{"title":"List message templates","deprecated":null,"version":null,"openapi":"/openapi/moja.json get /v1/message-templates/list","href":"/api-reference/moja/broadcast/list-message-templates"},{"title":"Send template message","deprecated":null,"version":null,"openapi":"/openapi/moja.json post /v1/broadcast/template/api-send","href":"/api-reference/moja/broadcast/send-template-message"},{"title":"Receive template delivery report","deprecated":null,"version":null,"openapi":"/openapi/moja.json post /template-dlr","href":"/api-reference/moja/broadcast/receive-template-delivery-report"}]},{"group":"USSD","expanded":false,"pages":[{"title":"Introduction","href":"/guides/ussd/index"},{"title":"Authentication","href":"/guides/ussd/authentication"},{"title":"USSD callback","href":"/guides/ussd/callback"},{"title":"Check balance","href":"/guides/ussd/check-balance"},{"title":"USSD simulator","openapi":"openapi/ussd.json POST /","href":"/api-reference/ussd/simulator"},{"group":"API Reference","pages":[{"title":"Check USSD credit balance","deprecated":null,"version":null,"openapi":"/openapi/ussd.json get /credit-balance","href":"/api-reference/ussd/check-ussd-credit-balance"},{"title":"Receive USSD session callback","deprecated":null,"version":null,"openapi":"/openapi/ussd.json post /callback","href":"/api-reference/ussd/receive-ussd-session-callback"}]}]},{"group":"Airtime","expanded":false,"pages":[{"title":"Introduction","href":"/guides/airtime/index"},{"title":"Prerequisites","href":"/guides/airtime/prerequisites"},{"title":"Authentication","href":"/guides/airtime/authentication"},{"title":"Sending airtime","href":"/guides/airtime/sending-airtime"},{"title":"Callbacks","href":"/guides/airtime/callbacks"},{"title":"Transaction status","href":"/guides/airtime/transaction-status"},{"title":"Check balance","href":"/guides/airtime/check-balance"},{"title":"Response codes","href":"/guides/airtime/response-codes"},{"group":"API Reference","pages":[{"title":"Send airtime","deprecated":null,"version":null,"openapi":"/openapi/airtime.json post /v1/transfer","href":"/api-reference/send-airtime"},{"title":"Check transaction status","deprecated":null,"version":null,"openapi":"/openapi/airtime.json post /v1/transaction-status","href":"/api-reference/check-transaction-status"},{"title":"Receive airtime callback","deprecated":null,"version":null,"openapi":"/openapi/airtime.json post /airtime/callback","href":"/api-reference/receive-airtime-callback"},{"title":"Check credit balance","deprecated":null,"version":null,"openapi":"/openapi/airtime.json get /credit-balance","href":"/api-reference/check-credit-balance"}]}]},{"group":"Payments Collection","expanded":false,"pages":[{"title":"Introduction","href":"/guides/payments-collection/index"},{"title":"Prerequisites","href":"/guides/payments-collection/prerequisites"},{"title":"Authentication","href":"/guides/payments-collection/authentication"},{"title":"Callbacks","href":"/guides/payments-collection/callbacks"},{"title":"Check balance","href":"/guides/payments-collection/check-balance"},{"title":"Bpay collection simulator","openapi":"openapi/payments-collection.json POST /","href":"/api-reference/payments-collection/simulator"},{"group":"API Reference","pages":[{"title":"Check Bpay credit balance","deprecated":null,"version":null,"openapi":"/openapi/payments-collection.json get /credit-balance","href":"/api-reference/payments-collection/check-bpay-credit-balance"},{"title":"Receive payment collection callback","deprecated":null,"version":null,"openapi":"/openapi/payments-collection.json post /callback","href":"/api-reference/payments-collection/receive-payment-collection-callback"}]}]},{"group":"Payments Checkout","expanded":false,"pages":[{"title":"Introduction","href":"/guides/payments-checkout/index"},{"title":"Prerequisites","href":"/guides/payments-checkout/prerequisites"},{"title":"Authentication","href":"/guides/payments-checkout/authentication"},{"title":"Redirect method","href":"/guides/payments-checkout/redirect-method"},{"title":"Iframe method","href":"/guides/payments-checkout/iframe-method"},{"title":"Callbacks","href":"/guides/payments-checkout/callbacks"},{"title":"Error codes","href":"/guides/payments-checkout/error-codes"},{"title":"Sandbox","href":"/guides/payments-checkout/sandbox"},{"group":"API Reference","pages":[{"title":"Request checkout page","deprecated":null,"version":null,"openapi":"/openapi/payments-checkout.json get /checkout","href":"/api-reference/payments-checkout/request-checkout-page"},{"title":"Whitelist website for iframe checkout","deprecated":null,"version":null,"openapi":"/openapi/payments-checkout.json post /whitelist/add-to-list","href":"/api-reference/payments-checkout/whitelist-website-for-iframe-checkout"},{"title":"Receive checkout payment callback","deprecated":null,"version":null,"openapi":"/openapi/payments-checkout.json post /callback","href":"/api-reference/payments-checkout/receive-checkout-payment-callback"}]}]},{"group":"OTP","expanded":false,"pages":[{"title":"Introduction","href":"/guides/otp/index"},{"title":"Prerequisites","href":"/guides/otp/prerequisites"},{"title":"Authentication","href":"/guides/otp/authentication"},{"title":"Verification flow","href":"/guides/otp/verification-flow"},{"title":"OTP lifecycle","href":"/guides/otp/otp-lifecycle"},{"title":"API responses","href":"/guides/otp/api-responses"},{"title":"Security","href":"/guides/otp/security"},{"group":"API Reference","pages":[{"title":"Request OTP","deprecated":null,"version":null,"openapi":"/openapi/otp.json post /request","href":"/api-reference/request-otp"},{"title":"Verify OTP","deprecated":null,"version":null,"openapi":"/openapi/otp.json post /verify","href":"/api-reference/verify-otp"}]}]}]}]},"basePath":"","title":"Authentication - Beem API","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}