# WhatsApp Phone Number Checker

This script is developed to check the existence of phone numbers in WhatsApp. It analyzes the numbers specified in the file and classifies them into existing numbers in WhatsApp and non-existing ones.

{% embed url="<https://github.com/Whapi-Cloud/whatsapp-checker>" %}

{% hint style="info" %}
Check any numbers from any country. Determine which phone numbers are active and which cannot receive Whatsapp messages. Optimize your resources and save time and money.
{% endhint %}

This tool was created using our public API that you can access too with your [Whapi.Cloud](https://whapi.cloud) account. Getting Started with our API: <https://support.whapi.cloud/help-desk/getting-started/getting-started>&#x20;

### How to use

#### Preparation

1. Make sure you have [Node.js](https://nodejs.org/) installed.
2. Clone the repository or download [the source files](https://github.com/Whapi-Cloud/whatsapp-checker) of the script.

#### Customization

1. open the `phones.json` file.
2. In the `check_phones` array, add the phone numbers you want to check. For example:

   ```
   {
     "`check_phones`: [ "number1", "number2".]
   }
   ```

#### Requirements

In the file `config.json` you need to insert **the token** from your personal account Whapi.Cloud, as well as the number you want to check. It also shows the limits we recommend to use. `daily_limit` is how many checks are left, and `refreshed_limit` is how much of the limit is set on refresh.

The `delay` argument determines the frequency of checks. And `checks_per_delay` is responsible for the number of numbers that will be checked during the check.

```javascript
{
  "token":"YOUR-TOKEN",  // Whapi.Cloud channel token.
  "refreshed_limit": 1000, // Maximum number of checks per day.
  
  "last_limit_refresh": 0, // Date of last update of limits. (Filled automatically).
  "daily_limit":0 // Remaining number of checks per day (Filled automatically).
  
  "delay": 10000, // Pause between checks of the number packet
  "checks_per_delay": 5 // Amount of numbers to be checked by one packet
  
  // In this case, 5 numbers will be checked every 10 seconds, but a maximum of 1000 numbers per day.
}
```

#### Running the script

Open a terminal or command prompt in the folder with the script. Run the following commands to install the necessary dependencies and compile the script: `npm i`

Run the script with the command: `npm run start`

#### Result

When the script finishes, you will get two files with results: `invalid.csv` and `valid.csv`, where numbers will be filtered accordingly.&#x20;

* The *invalid.csv* file will contain numbers that do not have WhatsApp.&#x20;
* The *valid.csv* file will contain numbers that have WhatsApp.
* The *unlimited.csv* file may appear if there are numbers left that are outside the daily limit you have set in the settings. This will allow you to continue working on checking numbers using this file.
