GET /users/me/contacts

Retrieve all saved contacts from WhatsApp

Responses

  • 200 application/json

    Contacts retrieved successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data array[object]
      Hide data attributes Show data attributes object
      • jid string
      • name string
      • push_name string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
GET /users/me/contacts
curl \
 --request GET 'http://localhost:7001/users/me/contacts' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "code": 200,
  "data": [
    {
      "jid": "6281234567890@s.whatsapp.net",
      "name": "John Doe",
      "push_name": "John"
    },
    {
      "jid": "6289876543210@s.whatsapp.net",
      "name": "Jane Smith",
      "push_name": "Jane"
    }
  ],
  "status": true,
  "message": "Contacts retrieved successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Contacts retrieved successfully",
  "data": [
    {
      "jid": "6281234567890@s.whatsapp.net",
      "name": "John Doe",
      "push_name": "John"
    }
  ]
}
Response examples (401)
{
  "code": 401,
  "error": "Invalid or expired JWT token",
  "status": false,
  "message": "Unauthorized"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "code": 500,
  "error": "Failed to retrieve contacts",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}