{"id":15093425,"url":"https://github.com/ultramsg/php-whatsapp-chatbot","last_synced_at":"2025-10-17T08:24:01.235Z","repository":{"id":121568757,"uuid":"474161868","full_name":"ultramsg/php-whatsapp-chatbot","owner":"ultramsg","description":"Make WhatsApp ChatBot and use WhatsApp API to send the WhatsApp messages in php .","archived":false,"fork":false,"pushed_at":"2022-10-08T06:55:54.000Z","size":1047,"stargazers_count":55,"open_issues_count":0,"forks_count":27,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T02:51:11.667Z","etag":null,"topics":["chat-bot","chatbot","php-bot","php-chatbot","whatsapp-api","whatsapp-api-php","whatsapp-bot","whatsapp-chat"],"latest_commit_sha":null,"homepage":"https://ultramsg.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ultramsg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-25T20:58:30.000Z","updated_at":"2025-02-08T12:10:00.000Z","dependencies_parsed_at":"2023-05-23T19:00:26.560Z","dependency_job_id":null,"html_url":"https://github.com/ultramsg/php-whatsapp-chatbot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultramsg%2Fphp-whatsapp-chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultramsg%2Fphp-whatsapp-chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultramsg%2Fphp-whatsapp-chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ultramsg%2Fphp-whatsapp-chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ultramsg","download_url":"https://codeload.github.com/ultramsg/php-whatsapp-chatbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248536990,"owners_count":21120683,"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":["chat-bot","chatbot","php-bot","php-chatbot","whatsapp-api","whatsapp-api-php","whatsapp-bot","whatsapp-chat"],"created_at":"2024-09-25T11:22:48.132Z","updated_at":"2025-10-17T08:24:01.164Z","avatar_url":"https://github.com/ultramsg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Ultramsg.com](https://ultramsg.com/?utm_source=github\u0026utm_medium=php\u0026utm_campaign=chatbot) WhatsApp Bot using WhatsApp API and ultramsg\nDemo WhatsApp API ChatBot using [Ultramsg API](https://ultramsg.com/?utm_source=github\u0026utm_medium=php\u0026utm_campaign=chatbot) with php.\n\n# Chatbot tasks:\n- The output of the command list .\n- The output of the server time of the bot running on .\n- Sending image to phone number or group .\n- Sending audio file .\n- Sending ppt audio recording .\n- Sending Video File.\n- Sending contact .\n- Sending Random Sentence .\n- Sending Random Joke .\n- Sending Random Image .\n\n# Getting Started\n- Ultramsg account is required to run examples. Log in or Create Account if you don't have one [ultramsg.com](https://ultramsg.com/?utm_source=github\u0026utm_medium=php\u0026utm_campaign=chatbot).\n- go to your instance or Create one if you haven't already.\n- Scan Qr and make sure that instance Auth Status : authenticated .\n\n\u0026nbsp;\n# webhook json format \nTo see how the received JSON will look this [video](https://www.youtube.com/watch?v=kipBHDOsFKI) .\n\n\u0026nbsp;\n# Run a chatbot\n\n## step1\nput your instance ID and Token in example.php \n```php\nnew ultraMsgChatBot(\"token\", \"instance_id\");\n```\n\n## step2\nactivate the \"Webhook on Received\" option and Set URL Webhook in Instance settings in ultramsg \nfor example :\nhttps://yourwebsite.com/chatbot/example.php\n\n## step3\nUpload the project/folder to your server or website .\n\n\n** Congratulations.. you can now talk to your chatbot **\n\n\u0026nbsp;\n# Functions\n\n## sendChatMessage\nUsed to send WhatsApp text messages\n```php\n$this-\u003eclient-\u003esendChatMessage($to, date('d.m.Y H:i:s'));\n```\n- $to – ID of the chat where the message should be sent for him, e.g 14155552671@c.us . \n\n\n## sendImageMessage\nSend a image to phone number or group\n```php\n$this-\u003eclient-\u003esendImageMessage($to, \"https://file-example.s3-accelerate.amazonaws.com/images/test.jpg\", \"image Caption\");\n\n```\n- $to – ID of the chat where the message should be sent for him, e.g 14155552671@c.us . \n\n## sendDocumentMessage\nSend a document to phone number or group\n```php\n$this-\u003eclient-\u003esendDocumentMessage($to, \"cv.pdf\", \"https://file-example.s3-accelerate.amazonaws.com/documents/cv.pdf\");\n```\n\n## sendVideoMessage\nSend a Video to phone number or group\n```php\n$this-\u003eclient-\u003esendVideoMessage($to, \"https://file-example.s3-accelerate.amazonaws.com/video/test.mp4\");\n\n```\n\n## sendAudioMessage\nSend a audio file to phone number or group\n```php\n$this-\u003eclient-\u003esendAudioMessage($to, \"https://file-example.s3-accelerate.amazonaws.com/audio/2.mp3\");\n```\n\n\n## sendVoiceMessage\nSend a ppt audio recording to phone number or group\n```php\n$this-\u003eclient-\u003esendVoiceMessage($to, \"https://file-example.s3-accelerate.amazonaws.com/voice/oog_example.ogg\");\n\n```\n\n## sendContactMessage\nSending one contact or contact list to phone number or group\n```php\n$this-\u003eclient-\u003esendContactMessage($to, \"14000000001@c.us\");\n```\n\n\n\u0026nbsp;\n# WhatsApp API PHP SDK\nYou can see Lightweight PHP library for WhatsApp API to send the whatsappp messages in PHP provided by Ultramsg.com\n[WhatsApp API PHP SDK](https://github.com/ultramsg/whatsapp-php-sdk)\n\n\u0026nbsp;\n# Youtube | WhatsApp api using PHP SDK\n[![Send Message by WhatsApp api using PHP SDK | Ultramsg PHP SDK\n](https://img.youtube.com/vi/OqDOKyMIp20/0.jpg)](https://www.youtube.com/watch?v=OqDOKyMIp20)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultramsg%2Fphp-whatsapp-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fultramsg%2Fphp-whatsapp-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fultramsg%2Fphp-whatsapp-chatbot/lists"}