Wapi.js SDK provides a single client utility per phone number basis, this means you can create a client with your Whatsapp Business Account regisytered phone numnber and you whatsapp business account id.
To create a client, you need to provide the following details:
Phone number: The phone number of the whatsapp business account
Whatsapp Business Account ID: The whatsapp business account id of the whatsapp business account
Whatsapp Business Account Token: The whatsapp business account token of the whatsapp business account
Now, to get the above details do checkout our guide on how to setup the whatsapp api to start building your application here
// creating a wapi.js clientimport { Client } from '@wapijs/wapi.js'export const whatsappClient = new Client({ apiAccessToken: <WHATSAPP_API_ACCESS_TOKEN>, businessAccountId: WHATSAPP_BUSINESS_ACCOUNT_ID, phoneNumberId: WHATSAPP_PHONE_NUMBER_ID, port: 8080, // the port you want your webhook to be exposed on webhookEndpoint: '/webhook', // the endpoint where the webhook will be exposed webhookSecret: WHATSAPP_WEBHOOK_SECRET // the secret key for the webhook, this would later be added to the whatsapp business account to verify the integrity of the webhook.})
To initiate the client, you need to call the initiate method on the client instance. This method ensures that your webhook server is up and running and listening to the incoming event from the whatsapp business platform.
This method must be called at the very end of the application flow logic, which ensures that all the event listeners the application intend to listen to must be attached before initiating the client.
// assuming you have already instantiated the client from the above guidewhatsappClient.initiate()
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Wapi.js","colors":{"primary":"#0D9373","light":"#07C983","dark":"#0D9373"},"favicon":"/favicon.svg","logo":{"light":"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/light.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=db1f5132bf7e2a14e2b2eee4014d4306","dark":"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/dark.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=c0c5eeaa3f7efce73b5f0811faf44532","href":"/"},"navbar":{"links":[{"label":"Report Bug","href":"https://github.com/sarthakjdev/wapi.js/issues/new"}],"primary":{"type":"button","label":"Github","href":"https://github.com/sarthakjdev/wapi.js"}},"search":{"prompt":"Search documentation..."},"seo":{"metatags":{"title":"Wapi.js","description":"Wapi.js is a node.js SDK built for developing WhatsApp Business platform apps with ease and faster","author":"Sarthak Jain \[email protected]>"},"indexing":"navigable"},"footer":{"socials":{"x":"https://x.com/sarthakjdev","github":"https://github.com/sarthakjdev/wapi.js","linkedin":"https://www.linkedin.com/in/sarthakjdev"}},"integrations":{"gtm":{"tagId":"G-R7HQXH2BE2"}},"navigation":{"global":{"anchors":[{"anchor":"Star us on GitHub","href":"https://github.com/sarthakjdev/wapi.js","icon":"github"},{"anchor":"Sign up to WapiKit","href":"https://app.wapikit.com/signin?utm_medium=wapijs+documentation\u0026utm_source=javascript.wapikit.com\u0026utm_content=sign+up+to+wapi+kit","icon":"code"},{"anchor":"Community","href":"https://join.slack.com/t/wapikit/shared_invite/zt-2kl7eg29s-4DfP9lFwojQg_yCcyW_w6Q","icon":"slack"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"na-730c8179","hasAudioNarration":false,"actualSubdomain":"na-730c8179","customDomains":["javascript.wapikit.com"],"gitSource":{"type":"github","owner":"sarthakjdev","repo":"wapi.js","deployBranch":"master","contentDirectory":"apps/docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e63e94a5dc2e6daf37e3","collectionId":"b3cdcbde-25af-407f-9a04-edbb14aee648","schemaVersion":"v2"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ae9208aff2c658dad6b9e59:success","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"API Reference","count":108},{"language":"default","tag":"API Documentation","count":108},{"language":"default","tag":"classes","count":49},{"language":"default","tag":"interfaces","count":41},{"language":"default","tag":"Guide","count":18},{"language":"default","tag":"enumerations","count":10},{"language":"default","tag":"type aliases","count":7},{"language":"default","tag":"Building your application","count":6},{"language":"default","tag":"Addional Resources","count":4},{"language":"default","tag":"Whatsapp API setup","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guide/building-your-application/creating-wapi-client","slug":"/guide/building-your-application/creating-wapi-client","pageMetadata":{"title":"Initiating the Wapi.js SDK","description":null,"href":"/guide/building-your-application/creating-wapi-client"},"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,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Wapi.js SDK provides a single client utility per phone number basis, this means you can create a client with your Whatsapp Business Account regisytered phone numnber and you whatsapp business account id.`}),`\n`,_jsx(Heading,{level:`3`,id:`creating-a-client`,children:`Creating a client`}),`\n`,_jsx(_components.p,{children:`To create a client, you need to provide the following details:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Phone number`}),`: The phone number of the whatsapp business account`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Whatsapp Business Account ID`}),`: The whatsapp business account id of the whatsapp business account`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Whatsapp Business Account Token`}),`: The whatsapp business account token of the whatsapp business account`]}),`\n`]}),`\n`,_jsxs(Tip,{children:[`Now, to get the above details do checkout our guide on how to setup the whatsapp api to start building your application `,_jsx(_components.a,{href:`/guide/whatsapp-api-setup`,children:`here`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// creating a wapi.js client`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@wapijs/wapi.js'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` whatsappClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tapiAccessToken:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`WHATSAPP_API_ACCESS_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tbusinessAccountId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` WHATSAPP_BUSINESS_ACCOUNT_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tphoneNumberId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` WHATSAPP_PHONE_NUMBER_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\tport:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 8080`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the port you want your webhook to be exposed on`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\twebhookEndpoint:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/webhook'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the endpoint where the webhook will be exposed`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\twebhookSecret:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` WHATSAPP_WEBHOOK_SECRET`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the secret key for the webhook, this would later be added to the whatsapp business account to verify the integrity of the webhook.`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`initiating-the-client`,children:`Initiating the client`}),`\n`,_jsxs(_components.p,{children:[`To initiate the client, you need to call the `,_jsx(_components.code,{children:`initiate`}),` method on the client instance. This method ensures that your webhook server is up and running and listening to the incoming event from the whatsapp business platform.`]}),`\n`,_jsx(Warning,{children:`This method must be called at the very end of the application flow logic, which ensures that all the event listeners the application intend to listen to must be attached before initiating the client.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// assuming you have already instantiated the client from the above guide`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`whatsappClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initiate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Initiating the Wapi.js SDK","description":null,"href":"/guide/building-your-application/creating-wapi-client"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Creating a client","slug":"creating-a-client","depth":3,"children":[]},{"title":"Initiating the client","slug":"initiating-the-client","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"na-730c8179","siteName":"Wapi.js","title":"Initiating the Wapi.js SDK - Wapi.js","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T02:43:46.910Z","originalFileLocation":"guide/building-your-application/creating-wapi-client.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=\"Wapi.js is a node.js SDK built for developing WhatsApp Business platform apps with ease and faster\">\u003cmeta data-mint-head name=\"application-name\" content=\"Wapi.js\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_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/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Initiating the Wapi.js SDK - Wapi.js\">\u003cmeta data-mint-head property=\"og:description\" content=\"Wapi.js is a node.js SDK built for developing WhatsApp Business platform apps with ease and faster\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Wapi.js\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://na-730c8179.mintlify.site/_mintlify/api/og/v2?division=Building+your+application\u0026amp;title=Initiating+the+Wapi.js+SDK\u0026amp;theme=84626bd417bce7c5cb20ffbd\u0026amp;signature=5de0a800427795c072bbc4f575d60018b627cea2cc8bbe2c15c2bd34846be6ff\">\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=\"Initiating the Wapi.js SDK - Wapi.js\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Wapi.js is a node.js SDK built for developing WhatsApp Business platform apps with ease and faster\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://na-730c8179.mintlify.site/_mintlify/api/og/v2?division=Building+your+application\u0026amp;title=Initiating+the+Wapi.js+SDK\u0026amp;theme=84626bd417bce7c5cb20ffbd\u0026amp;signature=5de0a800427795c072bbc4f575d60018b627cea2cc8bbe2c15c2bd34846be6ff\">\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/na-730c8179/TYkmauLBLSqpvYNB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Wapi.js\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D9373\">\u003cmeta data-mint-head name=\"author\" content=\"Sarthak Jain \u0026lt;[email protected]\u0026gt;\">\u003clink data-mint-head rel=\"canonical\" href=\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guide/building-your-application/creating-wapi-client.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://javascript.wapikit.com/#organization\",\"name\":\"Wapi.js\",\"url\":\"https://javascript.wapikit.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/na-730c8179/80ga8p47TsqYrSTi/logo/light.svg?fit=max\u0026auto=format\u0026n=80ga8p47TsqYrSTi\u0026q=85\u0026s=db1f5132bf7e2a14e2b2eee4014d4306\"}},{\"@type\":\"WebSite\",\"@id\":\"https://javascript.wapikit.com#website\",\"name\":\"Wapi.js\",\"url\":\"https://javascript.wapikit.com\",\"publisher\":{\"@id\":\"https://javascript.wapikit.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client#webpage\",\"url\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\",\"name\":\"Initiating the Wapi.js SDK\",\"dateModified\":\"2026-01-07T02:43:46.910Z\",\"isPartOf\":{\"@id\":\"https://javascript.wapikit.com#website\"},\"breadcrumb\":{\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Wapi.js\",\"item\":\"https://javascript.wapikit.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Initiating the Wapi.js SDK\",\"item\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client#article\",\"headline\":\"Initiating the Wapi.js SDK\",\"name\":\"Initiating the Wapi.js SDK\",\"url\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client\",\"mainEntityOfPage\":{\"@id\":\"https://javascript.wapikit.com/guide/building-your-application/creating-wapi-client#webpage\"},\"dateModified\":\"2026-01-07T02:43:46.910Z\",\"publisher\":{\"@id\":\"https://javascript.wapikit.com/#organization\"},\"isPartOf\":{\"@id\":\"https://javascript.wapikit.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Wapi.js\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Wapi.js","nav":{"global":{"anchors":[{"anchor":"Star us on GitHub","href":"https://github.com/sarthakjdev/wapi.js","icon":"github"},{"anchor":"Sign up to WapiKit","href":"https://app.wapikit.com/signin?utm_medium=wapijs+documentation\u0026utm_source=javascript.wapikit.com\u0026utm_content=sign+up+to+wapi+kit","icon":"code"},{"anchor":"Community","href":"https://join.slack.com/t/wapikit/shared_invite/zt-2kl7eg29s-4DfP9lFwojQg_yCcyW_w6Q","icon":"slack"}]},"tabs":[{"tab":"Guide","groups":[{"group":"Quick Start","pages":[{"title":"Introduction","href":"/guide/introduction"},{"title":"Quick Start Guide","href":"/guide/quickstart"}]},{"group":"Installation and Preparations","pages":[{"title":null,"href":"/guide/installation-and-preparations/setup-node"},{"title":"Setting up Wapi.js Application Development Environment","href":"/guide/installation-and-preparations/creating-application"}]},{"group":"Whatsapp API setup","pages":[{"title":"WhatsApp Business Platform","href":"/guide/whatsapp-api-setup/understanding-whatsapp-business-platform"},{"title":"Create a Meta Business App","href":"/guide/whatsapp-api-setup/creating-business-app"},{"title":"Getting API Key for WhatsApp Cloud Platform","href":"/guide/whatsapp-api-setup/getting-api-key"},{"title":"Configuring Webhook","description":"Learn how to configure the webhook for your Whatsapp Business Account","href":"/guide/whatsapp-api-setup/configuring-webhook"}]},{"group":"Building your application","pages":[{"title":"Initiating the Wapi.js SDK","href":"/guide/building-your-application/creating-wapi-client"},{"title":"Building Message Components","description":"Build message components with ease using the Wapi.js SDK","href":"/guide/building-your-application/building-message-components"},{"title":"Sending Messages","href":"/guide/building-your-application/sending-messages"},{"title":"Handle Events","href":"/guide/building-your-application/event-handling"},{"title":"Replying and Reacting to messages","href":"/guide/building-your-application/replying-and-reacting"},{"title":"Handling Media","href":"/guide/building-your-application/handling-media"}]},{"group":"Addional Resources","pages":[{"title":"Scope of Wapi.js SDK","href":"/guide/wapijs-sdk-scope"},{"title":"Important Reference Links","href":"/guide/references"},{"title":"Contributing to Wapi.js","href":"/guide/contributing"},{"title":null,"href":"/guide/contact"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/README"}]}]},"basePath":"","title":"Initiating the Wapi.js SDK - Wapi.js","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":[],"chunks":[]}