Source: src/tools/ServiceMethods.php
Docs: https://green-api.com/en/docs/api/service/
Property name is serviceMethods, not service.
Docs: https://green-api.com/en/docs/api/service/CheckWhatsapp/
public function checkWhatsapp(int $phoneNumber): stdClassSDK sends only phoneNumber (integer).
Docs also support chatId and force — not exposed by this SDK.
Success data (docs): existsWhatsapp (bool), optionally chatId (e.g. @lid), fromCache.
$r = $greenApi->serviceMethods->checkWhatsapp(79876543210);
// $r->data->existsWhatsappDocs: https://green-api.com/en/docs/api/service/GetAvatar/
public function getAvatar(string $chatId): stdClassDocs: https://green-api.com/en/docs/api/service/GetContacts/
public function getContacts(): stdClassList of contacts known to the account.
Docs: https://green-api.com/en/docs/api/service/GetContactInfo/
public function getContactInfo(string $chatId): stdClassDocs: https://green-api.com/en/docs/api/service/EditMessage/
public function editMessage(string $chatId, string $idMessage, string $message): stdClassDocs: https://green-api.com/en/docs/api/service/DeleteMessage/
public function deleteMessage(
string $chatId,
string $idMessage,
bool $onlySenderDelete = false
): stdClassDocs: ArchiveChat, UnarchiveChat
public function archiveChat(string $chatId): stdClass
public function unarchiveChat(string $chatId): stdClassDocs: archive only chats with at least one incoming message.
Docs: https://green-api.com/en/docs/api/service/SetDisappearingChat/
public function setDisappearingChat(string $chatId, int $ephemeralExpiration): stdClassStandard values (docs): 0 off, 86400 (24h), 604800 (7d), 7776000 (90d).
Docs: https://green-api.com/en/docs/api/service/SendTyping/
public function sendTyping(
string $chatId,
int $typingTime = null,
string $typingType = null
): stdClass| Param | Docs |
|---|---|
typingTime |
1000–20000 ms |
typingType |
omit for text typing; recording for audio |
$greenApi->serviceMethods->sendTyping('79876543210@c.us', 5000);
$greenApi->serviceMethods->sendTyping('79876543210@c.us', 5000, 'recording');Total perceived delay = queue delay + typingTime (docs note).
getChats(docs service method; not in PHPServiceMethods.php)