Events currently tracks the following resource types and associated event types. Any related event data (like what properties were changed). The originating source for the event, including its IP address. The BulkExport API provides an efficient mechanism for retrieving all of your activity logs from the Twilio platform on an ongoing basis, or for one-off downloads. Open views/layouts/main.php and update it to match the following.Ĭonst table = document.getElementById('clientsTable') Ĭonst checkboxes = om(table. The actor that caused the event to happen. SweetAlert will be used to display the popup form and notifications. Once the request has been completed successfully, an alert will be displayed.īefore we edit the view, let's edit the main layout to remove the default Yii2 header and footer, and import SweetAlert via CDN. Submitting that form will make a POST request containing the content of the SMS and the clients to be notified. You can see a mockup in the image below.Ĭlicking on this button will trigger a pop-up into which the SMS content is typed. Beside each client in the list, there will be a checkbox to indicate which of the clients has been selected, and at the bottom of the table will be a button to send an SMS to all the selected clients. The clients' list will be displayed in a table. Dispatches the messages to the selected clients. Returns a JSON response with a success message.Takes the request and retrieves the clients and smsContent keys.The actionNotify function does three things it: These clients, along with the pagination object, are passed to the view located in views/layouts/main.php. In the actionIndex function, we use pagination to retrieve the clients from the database in batches. To get started, create a new application named bulk_sms_app, and switch to the project directory using the following commands. A smartphone with an active phone number.Note: if you are sending to this many numbers at a time, you may want to add many more numbers or a short code to your number pool. If you have more messages to send, then you’ll want to split up the requests. If you are new to Twilio click here to create a free account now and receive a $10 credit when you upgrade to a paid account. Twilio limits the size of an API request to 1MB total, which is typically sufficient to send to about 10,000 numbers. To follow this tutorial, you need the following components: We will build an application that will send customized SMS notifications in bulk to clients via Twilio's SMS API. So in this article, I will show you how to send SMS notifications in bulk using Twilio, which makes managing/dispatching programmable SMS a breeze, and PHP's Yii2 framework. They also have the added advantage of accessibility because even customers using feature phones are able to receive notifications.Ĭonsequently, the question then becomes: how do you send SMS notifications to a large number of phones efficiently? This is because sending SMS notifications sequentially will likely create a scalability bottleneck. SMS notifications, specifically, provide a large reach due to the sheer number of phones in circulation. Notifications are an essential feature of an application because they provide an outlet for them to keep the customers updated with activities relating to their accounts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |