{"id":18051723,"url":"https://github.com/apimatic/whatsapp-typescript-sdk","last_synced_at":"2025-04-05T07:13:40.687Z","repository":{"id":37097893,"uuid":"504460487","full_name":"apimatic/whatsapp-typescript-sdk","owner":"apimatic","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-17T08:52:49.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T14:53:16.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apimatic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-17T08:50:51.000Z","updated_at":"2025-02-05T14:59:51.000Z","dependencies_parsed_at":"2022-06-24T12:53:54.069Z","dependency_job_id":null,"html_url":"https://github.com/apimatic/whatsapp-typescript-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fwhatsapp-typescript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fwhatsapp-typescript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fwhatsapp-typescript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fwhatsapp-typescript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apimatic","download_url":"https://codeload.github.com/apimatic/whatsapp-typescript-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299850,"owners_count":20916193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T22:55:17.912Z","updated_at":"2025-04-05T07:13:40.662Z","avatar_url":"https://github.com/apimatic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Getting Started with WhatsApp Cloud API\n\n## Introduction\n\nWelcome to the WhatsApp API from Meta.\n\nIndividual developers and existing Business Service Providers (BSPs) can now send and receive messages via the WhatsApp API using a cloud-hosted version of the WhatsApp Business API. Compared to the previous solutions, the cloud-based WhatsApp API is simpler to use and is a more cost-effective way for businesses to use WhatsApp. Please keep in mind the following configurations:\n\n| Name | Description |\n| --- | --- |\n| Version | Latest [Graph API version](https://developers.facebook.com/docs/graph-api/). For example: v13.0 |\n| User-Access-Token | Your user access token after signing up at [developers.facebook.com](https://developers.facebook.com). |\n| WABA-ID | Your WhatsApp Business Account (WABA) ID. |\n| Phone-Number-ID | ID for the phone number connected to the WhatsApp Business API. You can get this with a [Get Phone Number ID request](3184f675-d289-46f1-88e5-e2b11549c418). |\n| Business-ID | Your Business' ID. Once you have your Phone-Number-ID, make a [Get Business Profile request](#99fd3743-46cf-46c4-95b5-431c6a4eb0b0) to get your Business' ID. |\n| Recipient-Phone-Number | Phone number that you want to send a WhatsApp message to. |\n| Media-ID | ID for the media to [send a media message](#0a632754-3788-43bf-b785-ac6a73423d5a) or [media template message](#439c926a-8a6c-4972-ab2c-d99297716da9) to your customers. |\n| Media-URL | URL for the media to [download media content](#cbe5ece3-246c-48f3-b338-074187dfef66). |\n\n## Building\n\n### Requirements\n\nThe SDK relies on **Node.js** and **npm** (to resolve dependencies). You can download and install Node.js and [npm](https://www.npmjs.com/) from [the official Node.js website](https://nodejs.org/en/download/).\n\n\u003e **NOTE:** npm is installed by default when Node.js is installed.\n\n### Verify Successful Installation\n\nRun the following commands in the command prompt or shell of your choice to check if Node.js and npm are successfully installed:\n\n* Node.js: `node --version`\n\n* npm: `npm --version`\n\n![Version Check](https://apidocs.io/illustration/typescript?workspaceFolder=WhatsAppCloudAPI\u0026step=versionCheck)\n\n### Install Dependencies\n\n- To resolve all dependencies, go to the **SDK root directory** and run the following command with npm:\n\n```bash\nnpm install\n```\n\n- This will install all dependencies in the **node_modules** folder.\n\n![Resolve Dependencies](https://apidocs.io/illustration/typescript?workspaceFolder=WhatsAppCloudAPI\u0026workspaceName=whatsapp-cloud-apilib\u0026step=resolveDependency)\n\n## Installation\n\nThe following section explains how to use the generated library in a new project.\n\n### 1. Initialize the Node Project\n\n- Open an IDE/text editor for JavaScript like Visual Studio Code. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.\n\n- Click on **File** and select **Open Folder**. Select an empty folder of your project, the folder will become visible in the sidebar on the left.\n\n![Open Folder](https://apidocs.io/illustration/typescript?step=openProject)\n\n- To initialize the Node project, click on **Terminal** and select **New Terminal**. Execute the following command in the terminal:\n\n```bash\nnpm init --y\n```\n\n![Initialize the Node Project](https://apidocs.io/illustration/typescript?step=initializeProject)\n\n### 2. Add Dependencies to the Client Library\n\n- The created project manages its dependencies using its `package.json` file. In order to add a dependency on the *WhatsApp Cloud APILib* client library, double click on the `package.json` file in the bar on the left and add the dependency to the package in it.\n\n![Add WhatsappCloudApilib Dependency](https://apidocs.io/illustration/typescript?workspaceFolder=WhatsAppCloudAPI\u0026workspaceName=whatsapp-cloud-apilib\u0026step=importDependency)\n\n- To install the package in the project, run the following command in the terminal:\n\n```bash\nnpm install\n```\n\n![Install WhatsappCloudApilib Dependency](https://apidocs.io/illustration/typescript?step=installDependency)\n\n## Initialize the API Client\n\n**_Note:_** Documentation for the client can be found [here.](doc/client.md)\n\nThe following parameters are configurable for the API Client:\n\n| Parameter | Type | Description |\n|  --- | --- | --- |\n| `version` | `string` | *Default*: `'v13.0'` |\n| `environment` | Environment | The API environment. \u003cbr\u003e **Default: `Environment.Production`** |\n| `timeout` | `number` | Timeout for API calls.\u003cbr\u003e*Default*: `0` |\n| `httpClientOptions` | `Partial\u003cHttpClientOptions\u003e` | Stable configurable http client options. |\n| `unstableHttpClientOptions` | `any` | Unstable configurable http client options. |\n| `accessToken` | `string` | The OAuth 2.0 Access Token to use for API requests. |\n\n### HttpClientOptions\n\n| Parameter | Type | Description |\n|  --- | --- | --- |\n| `timeout` | `number` | Timeout in milliseconds. |\n| `httpAgent` | `any` | Custom http agent to be used when performing http requests. |\n| `httpsAgent` | `any` | Custom https agent to be used when performing http requests. |\n| `retryConfig` | `Partial\u003cRetryConfiguration\u003e` | Configurations to retry requests. |\n\n### RetryConfiguration\n\n| Parameter | Type | Description |\n|  --- | --- | --- |\n| `maxNumberOfRetries` | `number` | Maximum number of retries. \u003cbr\u003e *Default*: `0` |\n| `retryOnTimeout` | `boolean` | Whether to retry on request timeout. \u003cbr\u003e *Default*: `true` |\n| `retryInterval` | `number` | Interval before next retry. Used in calculation of wait time for next request in case of failure. \u003cbr\u003e *Default*: `1` |\n| `maximumRetryWaitTime` | `number` | Overall wait time for the requests getting retried. \u003cbr\u003e *Default*: `0` |\n| `backoffFactor` | `number` | Used in calculation of wait time for next request in case of failure. \u003cbr\u003e *Default*: `2` |\n| `httpStatusCodesToRetry` | `number[]` | Http status codes to retry against. \u003cbr\u003e *Default*: `[408, 413, 429, 500, 502, 503, 504, 521, 522, 524]` |\n| `httpMethodsToRetry` | `HttpMethod[]` | Http methods to retry against. \u003cbr\u003e *Default*: `['GET', 'PUT']` |\n\nThe API client can be initialized as follows:\n\n```ts\nconst client = new Client({\n  timeout: 0,\n  environment: Environment.Production,\n  accessToken: 'AccessToken',\n})\n```\n\n## Authorization\n\nThis API uses `OAuth 2 Bearer token`.\n\n## List of APIs\n\n* [Business Profiles](doc/controllers/business-profiles.md)\n* [Phone Numbers](doc/controllers/phone-numbers.md)\n* [Two-Step Verification](doc/controllers/two-step-verification.md)\n* [Messages](doc/controllers/messages.md)\n* [Registration](doc/controllers/registration.md)\n* [Media](doc/controllers/media.md)\n\n## Classes Documentation\n\n* [ApiResponse](doc/api-response.md)\n* [ApiError](doc/api-error.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimatic%2Fwhatsapp-typescript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapimatic%2Fwhatsapp-typescript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimatic%2Fwhatsapp-typescript-sdk/lists"}