API WhatsApp Web API WhatsApp Web

List Blocked Contacts

This API allows you to retrieve the list of blocked contacts from a WhatsApp instance via a POST request.

Base URL

URL: https://apiwhatsappweb.com/api/not-allowed-contacts

All requests must be made to this base URL.

Authentication

To authenticate the requests, include the API Key (apiKey) and the Instance ID (id) in the request header.

    {
        "apiKey": "Your API key here",
        "id": "Your instance ID here"
    }
        

Usage Examples

    const axios = require("axios");
    
    let config = {
        method: 'post',
        url: 'https://apiwhatsappweb.com/api/not-allowed-contacts',
        headers: { 
            'apiKey': 'Bearer Your_ApiKey',
            'id': 'Your_Instance_ID_Here',
            'Content-Type': 'application/json'
        }
    };
    
    axios.request(config)
        .then(response => console.log(response.data))
        .catch(error => console.error(error));
    

WhatsApp Group Invitation Configuration

API Documentation

This API allows you to configure who can add your WhatsApp account to groups.

Base URL

URL: https://apiwhatsappweb.com/api/group-config

All requests must be made to this base URL.

Authentication

To authenticate requests, include the API Key (apiKey) and the Instance ID (id) in the request header.

{
        "apiKey": "Your API key here",
        "id": "Your instance ID here"
    }

How to Configure Group Permissions

Request Body

The request body should be a JSON object with the following structure:

{
        "id": "INSTANCE_ID",   // ID of the connected instance
        "groupSetting": "all"  // Options: "all", "contacts", "contacts_except"
    }

Available Options

  • "all": Anyone can add you to groups.
  • "contacts": Only your contacts can add you to groups.
  • "contacts_except": Your contacts can add you, except for some specific numbers.

Code Examples

    const axios = require("axios");
    
    let data = JSON.stringify({
        "id": "INSTANCE_ID",
        "groupSetting": "contacts"
    });
    
    let config = {
        method: 'post',
        url: 'https://apiwhatsappweb.com/api/group-config',
        headers: { 
            'apiKey': 'Bearer Your_ApiKey',
            'id': 'Your_Instance_ID_Here',
            'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios.request(config)
        .then((response) => console.log(response.data))
        .catch((error) => console.log(error));
                

Response Examples

Success Example

{
        "success": true,
        "message": "Group settings updated!",
        "groupSetting": "contacts"
    }

Error Example

{
        "error": "Instance ID not found."
    }

Status Codes

  • 200 OK: Configuration successfully changed.
  • 401 Unauthorized: Authentication failed.
  • 404 Not Found: Instance ID not found.
  • 500 Internal Server Error: A server error occurred.

Online Visibility Configuration in WhatsApp

API Documentation

This API allows you to configure who can see your "Online" status on WhatsApp.

Base URL

URL: https://apiwhatsappweb.com/api/online-visibility

All requests must be made to this base URL.

Authentication

To authenticate requests, you must include the API Key (apiKey) and the Instance ID (id) in the request header.

{
        apiKey: Your API key here
        id: Your instance ID here
    }

How to Configure Online Status Visibility:

Request Body

The request body should be a JSON object with the following structure:

{
        "id": "INSTANCE_ID",  // ID of the WhatsApp connected instance
        "visibilitySetting": "everyone" // Options: "everyone", "contacts", "contacts_except", "nobody"
    }

Available Options

  • "everyone": Anyone can see when you are online.
  • "contacts": Only your contacts can see your online status.
  • "contacts_except": Your contacts can see your online status, except for certain numbers.
  • "nobody": Nobody can see your online status.

Usage Examples

    const axios = require("axios");
    
    let data = JSON.stringify({
    "id": "INSTANCE_ID",
    "visibilitySetting": "contacts_except"
    });
    
    let config = {
        method: 'post',
        url: 'https://apiwhatsappweb.com/api/online-visibility',
        headers: { 
    'apiKey': 'Bearer Your_ApiKey',
    'id': 'Your_Instance_ID_Here',
    'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios.request(config)
        .then((response) => {
            console.log(response.data);
        })
        .catch((error) => {
            console.log(error);
        });
    
    import requests
    
    url = 'https://apiwhatsappweb.com/api/online-visibility'
    headers = {
    'apiKey': 'Bearer Your_ApiKey',
    'id': 'Your_Instance_ID_Here',
    'Content-Type': 'application/json'
    }
    data = {
    "id": "INSTANCE_ID",
    "visibilitySetting": "nobody"
    }
    
    response = requests.post(url, headers=headers, json=data)
    print(response.json())
    

Read Receipt Configuration in WhatsApp

API Documentation

This API allows you to enable or disable the read receipts (blue checks) on WhatsApp.

Base URL

URL: https://apiwhatsappweb.com/api/read-receipts

All requests must be made to this base URL.

Authentication

To authenticate the requests, you must include the API Key (apiKey) and the Instance ID (id) in the request header.

{
        apiKey: Your API key here
        id: Your instance ID here
    }

How to enable/disable read receipts:

Request Body

The request body should be a JSON object with the following structure:

{
        "id": "INSTANCE_ID",  // ID of the WhatsApp connected instance
        "readReceipts": true   // true = Enable | false = Disable
    }

Usage Examples

    const axios = require("axios");
    
    let data = JSON.stringify({
    "id": "INSTANCE_ID",
    "readReceipts": false
    });
    
    let config = {
        method: 'post',
        url: 'https://apiwhatsappweb.com/api/read-receipts',
        headers: { 
    'apiKey': 'Bearer Your_ApiKey',
    'id': 'Your_Instance_ID_Here',
    'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios.request(config)
        .then((response) => {
            console.log(response.data);
        })
        .catch((error) => {
            console.log(error);
        });
    
    import requests
    
    url = 'https://apiwhatsappweb.com/api/read-receipts'
    headers = {
    'apiKey': 'Bearer Your_ApiKey',
    'id': 'Your_Instance_ID_Here',
    'Content-Type': 'application/json'
    }
    data = {
    "id": "INSTANCE_ID",
    "readReceipts": true
    }
    
    response = requests.post(url, headers=headers, json=data)
    print(response.json())