contact_getCountryCode
Retrieves the country code from a WhatsApp contact ID. Provide the session ID and contact ID to get the numeric country code prefix.
Instructions
[Contact] Get the country code. Returns the contact's country code, (1541859685@c.us) => (1).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "contact_getCountryCode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contactId | No | Unique WhatsApp ID for the contact | |
| sessionId | Yes | Unique identifier for the session (alphanumeric and - allowed) |