{"id":14987056,"url":"https://github.com/raphaelvserafim/client-php-api-wa-me","last_synced_at":"2025-04-11T23:21:42.560Z","repository":{"id":211365670,"uuid":"726928812","full_name":"raphaelvserafim/client-php-api-wa-me","owner":"raphaelvserafim","description":"API WhatsApp PHP","archived":false,"fork":false,"pushed_at":"2024-11-19T21:22:05.000Z","size":111,"stargazers_count":11,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-05T18:51:11.196Z","etag":null,"topics":["php","php-library","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-chat"],"latest_commit_sha":null,"homepage":"https://api-wa.me","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphaelvserafim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T20:06:01.000Z","updated_at":"2025-04-04T23:11:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1d0d4b1-1cf2-4884-89cd-55db6534f7b0","html_url":"https://github.com/raphaelvserafim/client-php-api-wa-me","commit_stats":{"total_commits":114,"total_committers":3,"mean_commits":38.0,"dds":0.4035087719298246,"last_synced_commit":"e029644512f7e79aa2b462d3e2c1dc61efde2e11"},"previous_names":["raphaelvserafim/client-php-api-wa-me"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelvserafim%2Fclient-php-api-wa-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelvserafim%2Fclient-php-api-wa-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelvserafim%2Fclient-php-api-wa-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphaelvserafim%2Fclient-php-api-wa-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphaelvserafim","download_url":"https://codeload.github.com/raphaelvserafim/client-php-api-wa-me/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493045,"owners_count":21113190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-library","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-chat"],"created_at":"2024-09-24T14:14:01.458Z","updated_at":"2025-04-11T23:21:42.533Z","avatar_url":"https://github.com/raphaelvserafim.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatsApp API\n\n## About Our WhatsApp API\n\n🔓 **Unlock the Potential of WhatsApp:** Powerful Integration with Our Unofficial API!\n\n### Efficient Group Management on WhatsApp\n\n📋 Our stable, though unofficial, API allows for efficient management of WhatsApp groups. Simplify administration, and easily add or remove members.\n\n### Versatile Message Sending\n\n💬 With our API, you can send text, audio, video, and image messages quickly and easily. Adapt to your business communication needs comprehensively.\n\n### Receive Instant Events\n\n🔔 Stay updated with our API, receiving real-time events when new messages are received. Stay connected and agile in responding to interactions on WhatsApp.\n\n🔗 **Create Your Account:** Visit [https://api-wa.me/sign-up](https://api-wa.me/sign-up) to create your account and start using our API today!\n\n🎁 **Special Discount:** Use the coupon **GIT20** and get 20% off on your first instance!\n\n## Contact Support\n\n- **Name:** Raphael Serafim\n- **Email:** [support@api-wa.me](mailto:support@api-wa.me)\n- **Website:** [https://api-wa.me](https://api-wa.me)\n\n\n\n## Installing via composer\n\n```\ncomposer require raphaelvserafim/client-php-api-wa-me\n```\n\n### EXAMPLES\n\n\n#####  WHATSAPP\n```php\n\nuse Api\\Wame\\WhatsApp;\n\ninclude_once 'vendor/autoload.php';\n\n$whatsapp     = new WhatsApp(\n    [\"server\" =\u003e \"API server\", \n    \"key\" =\u003e \"Your Key Instance\"]\n    );\n```\n\n#### Get webhook \n```php\n    $whatsapp-\u003econstructWebhook();\n    $whatsapp-\u003efrom-\u003eremoteJid; //  number that sent message\n    $whatsapp-\u003efrom-\u003emessageType; // video | text | audio| image | sticker | document| reaction | liveLocation | \n    $whatsapp-\u003efrom-\u003emsgId;\n    $whatsapp-\u003efrom-\u003epushName;\n    $whatsapp-\u003efrom-\u003etext; \n```\n\n#### Exemple\n```php\nif ($whatsapp-\u003efrom-\u003emessageType === \"text\" \u0026\u0026 $whatsapp-\u003efrom-\u003etext === \"Hi\") {\n  $whatsapp-\u003esendText($whatsapp-\u003efrom-\u003eremoteJid, \"Hello!\");\n}\n```\n\n#### Get QrCode HTML\n```php\necho $whatsapp-\u003econnect();\n```\n\n#### Infor Instance\n```php\necho $whatsapp-\u003einforInstance();\n```\n\n#### Update Webhook\n```php\n$body = [\n\"allowWebhook\" =\u003e 1, // 1=true or 0=false\n\"webhookMessage\" =\u003e \"\",\n\"webhookGroup\" =\u003e \"\",\n\"webhookConnection\" =\u003e \"\",\n\"webhookQrCode\" =\u003e \"\", \n\"webhookMessageFromMe\"=\u003e\"\", \n\"webhookHistory\"=\u003e\"\"\n]; \necho $whatsapp-\u003eupdateWebhook($body);\n```\n\n#### Logout\n```php\necho $whatsapp-\u003elogout();\n```\n \n## Actions\n\n### Get List Contacts\n```php\necho $whatsapp-\u003elistContacts();\n```\n\n### Get Profile  Pic\n```php\necho $whatsapp-\u003eprofilePic('556696852025');\n```\n\n\n### Update Profile Name\n```php\necho $whatsapp-\u003eupdateProfileName('Raphael Serafim');\n```\n \n### Update Profile And Group  Picture\n```php\n$url =''; // url image \necho $whatsapp-\u003eupdateProfilePicture($url);\n```\n\n \n## Send Message\n\n### send Presence\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $status = 'composing';   // unavailable | available | composing | recording | paused\necho $whatsapp-\u003esendPresence($to, $status);\n```\n\n### send Text\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $text   = 'Hi';   \necho $whatsapp-\u003esendText($to, $text);\n```\n\n### send Audio\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $url    = ''; // your MP3 or OGG audio URL    \necho $whatsapp-\u003esendAudio($to, $url);\n```\n\n###  send Image \n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $url    = '';  \n $caption = '';\necho $whatsapp-\u003esendImage($to, $url);\n```\n \n ###  send Video \n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $url    = '';  \n $caption = '';\necho $whatsapp-\u003esendVideo($to, $url);\n```\n\n\n \n ###  send Document \n ```php\n$to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n$url    = '';  \n$caption = '';\n$mimetype = 'application/pdf'; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types \n$fileName='';\necho $whatsapp-\u003esendDocument($to, $url, $mimetype, $fileName);\n```\n\n \n ### Send Button\n ```php\n   $body = [\n    \"to\" =\u003e \"556696852025\",\n    \"title\" =\u003e \"Are you enjoying ?\",\n    \"footer\" =\u003e \"choose an option\",\n    \"buttons\" =\u003e [\n        [\n            \"type\"=\u003e \"quick_reply\",\n            \"id\" =\u003e \"click_1\",\n            \"text\" =\u003e \"Yes\"\n        ],\n        [\n            \"type\"=\u003e \"cta_copy\",\n            \"copy_code\" =\u003e \"000000000000\",\n            \"text\" =\u003e \"Copy barcode\"\n        ],\n        [\n            \"type\"=\u003e \"cta_url\",\n            \"url\" =\u003e \"https://api-wa.me\",\n            \"text\" =\u003e \"Access the website\"\n        ],\n        [\n            \"type\"=\u003e \"send_location\"\n        ]\n    ]\n];\necho $whatsapp-\u003esendButton($body);\n```\n\n\n ### Send List \n ```php\n   $body = [\n    \"to\" =\u003e \"556696852025\",\n    \"buttonText\" =\u003e \"Menu\",\n    \"text\" =\u003e \"string\", \n    \"title\" =\u003e \"Menu\",\n    \"description\" =\u003e \"Description\",\n    \"footer\" =\u003e \"footer\", \n    \"sections\" =\u003e [\n        [\n            \"title\" =\u003e \"Pizza\",\n            \"rows\" =\u003e [\n                [\n                    \"title\" =\u003e \"Pizza 01\",\n                    \"description\" =\u003e \"Example pizza 01\",\n                    \"rowId\" =\u003e \"1\"\n                ]\n            ]\n        ]\n    ]\n];\necho $whatsapp-\u003esendList($body);\n```\n\n\n### send Contact\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $name   = 'CACHE SISTEMAS';   \n $number = '+556696883327';\necho $whatsapp-\u003esendContact($to, $name, $number);\n```\n\n### send Location\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $lat    =  37.7749;   \n $lon    =  -122.4194;\n $address = '123 Main St, San Francisco, CA';\necho $whatsapp-\u003esendLocation($to, $lat, $lon, $address);\n```\n\n### send Reaction\n ```php\n $to     = '556696852025'; // if it's a group, use full id ex: 123456789@g.us  \n $text   =  '😘';   \n $msgId  =  '';\necho $whatsapp-\u003esendReaction($to, $text, $msgId);\n```\n\n\n## Group\n\n### Get list Group\n```php \n   echo $whatsapp-\u003elistGroup();\n```\n\n### Get infor Group\n```php \n   $group_id = '123456789@g.us'; \n   echo $whatsapp-\u003einforGroup($group_id);\n```\n\n\n### Get Invite Code Group\n```php \n   $group_id = '123456789@g.us'; \n   echo $whatsapp-\u003egroupInviteCode($group_id);\n```\n\n ### create Group\n```php \n   $name = 'API PHP WhatsApp'; \n   $participants = ['556696852025'];\n   echo $whatsapp-\u003ecreateGroup($name, $participants);\n```\n\n\n ### add Participants Group\n```php \n   $group_id     = '123456789@g.us'; \n   $participants = ['556696852025'];\n   echo $whatsapp-\u003eaddParticipantsGroup($group_id, $participants);\n```\n\n\n ### Promote Participants Group Admin \n```php \n   $group_id     = '123456789@g.us'; \n   $participants = ['556696852025'];\n   $action = \"promote\"; // demote\n   echo $whatsapp-\u003epromoteParticipantsGroup($group_id, $participants, $action);\n```\n\n ### Remove Participants Group  \n```php \n   $group_id     = '123456789@g.us'; \n   $participants = ['556696852025'];\n   echo $whatsapp-\u003eremoveParticipantsGroup($group_id, $participants);\n```\n\n ### Leave Group\n```php \n   $group_id     = '123456789@g.us'; \n   echo $whatsapp-\u003eleaveGroup($group_id);\n```\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelvserafim%2Fclient-php-api-wa-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphaelvserafim%2Fclient-php-api-wa-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphaelvserafim%2Fclient-php-api-wa-me/lists"}