This method allows you to retrieve detailed information about a contact or chat using a phone number or chat_id (for Telegram). It returns data from WAMM.chat about the contact, including their name, email, avatar, notes, tags, and chat settings. Useful for synchronizing contact data with external systems and CRMs.
GET /api2/contact_get/{token}/{phone}
Request Parameters
| Parameter | Type | Required | Description |
|---|
| token | string | Yes | API token obtained from settings |
| phone | string | Yes | Phone number in international format or chat ID (for Telegram) |
Success Response
{
"err": 0,
"data": {
"api_id": 100,
"tip": "user",
"phone": "79001234567",
"name": "Chat Name",
"email": "",
"web": "",
"avatar": "https://wamm.chat/avatar.jpg",
"notes": "",
"user_id": "",
"tags": "tag1; tag2",
"chat_banned": 0,
"chat_mute": 1,
"chat_favorite": 0
}
}
Response Field Description
| Field | Description |
|---|
| api_id | Channel number |
| tip | Contact type ("user" - user, "group" - group) |
| phone | Contact's phone number. For Telegram, MAX - chat ID |
| phone_real | Phone number/Nickname, if known, for Telegram, MAX, where phone is the chat ID |
| name | Contact name or chat title |
| email | Contact's email |
| web | Contact's URL |
| avatar | Contact's avatar URL |
| notes | Notes for the contact |
| user_id | ID of the user assigned to the chat (responsible) |
| tags | Tags separated by semicolon (;) |
| chat_banned | Ban status (0 - not banned, 1 - banned) |
| chat_mute | Notification status (0 - notifications enabled, 1 - notifications disabled) |
| chat_favorite | Pinned to top status (0 - not pinned, 1 - pinned) |
Possible Errors
| Error Code | Description |
|---|
| token fail | Token error |
| not found | Contact not found |
| phone fail | Phone number error |
Usage Examples