# WhatsApp Contact & Group Fetching

This API allows you to fetch contact and groups of your Connected WhatsApp Number and this API is supported only in WhatsApp Web Automation Channel&#x20;

{% hint style="danger" %}

### **Works only with WhatsApp Web Automation Channel and this feature is not stable, use at your own risk**&#x20;

{% endhint %}

## WhatsApp Contact & Group Fetching API

<mark style="color:green;">`POST`</mark> `https://pickyassist.com/app/api/v2/fetch-contacts`

API to fetch WhatsApp Contacts & Groups

#### Request Body

| Name        | Type   | Description                              |
| ----------- | ------ | ---------------------------------------- |
| token       | string | Your API Token for authentication        |
| application | number | <p>10 = WhatsApp Web Automation <br></p> |

{% tabs %}
{% tab title="200 " %}

```javascript
[
   {
      "number":"9194055074-16099455",
      "name":"API Group",
      "type":"group"
   },
   {
      "number":"9194055074-16161719",
      "name":"NEW SUBBB",
      "type":"group"
   },
   {
      "number":"1809723725",
      "name":"Joan Miranda",
      "type":"contact"
   },
   {
      "number":"2347076688",
      "name":"P.Tosin",
      "type":"contact"
   },
   {
      "number":"2347000485",
      "name":"Geraldox Gerry",
      "type":"contact"
   }
]
```

{% endtab %}
{% endtabs %}

## Sample Request Body JSON

```javascript
{
    	"token": "e16e32e750cf865fae95752a9f1d0898cb",
    	"application": "10"
 }

```

## Sample Response

```javascript
[
   {
      "number":"9194055074-16099455",
      "name":"API Group",
      "type":"group"
   },
   {
      "number":"9194055074-16161719",
      "name":"NEW SUBBB",
      "type":"group"
   },
   {
      "number":"1809723725",
      "name":"Joan Miranda",
      "type":"contact"
   },
   {
      "number":"2347076688",
      "name":"P.Tosin",
      "type":"contact"
   },
   {
      "number":"2347000485",
      "name":"Geraldox Gerry",
      "type":"contact"
   }
]
```

## Response Variables

| Variable Name | Type   | Description                                                |
| ------------- | ------ | ---------------------------------------------------------- |
| number        | String | WhatsApp Number or WhatsApp Group ID if the type=group     |
| name          | String | Name of the Contact / Group                                |
| type          | String | <p>contact = It's a contact</p><p>group = It's a group</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pickyassist.com/api-documentation-v2/whatsapp-settings-apis/whatsapp-contact-and-group-fetching.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
