![]() ![]() While TWILIO_WHATSAPP_FROM can be obtained when we setup the Twilio Testing Sandbox in the first step or the whatsapp number that we have sent a join excitement-ancient message. TWILIO_AUTH_SID and TWILIO_AUTH_TOKEN can be found on the Twilio dashboard page. ENV file, don't forget to add the twilio value as above for our needs to make the whatsapp notification feature in laravel 8 with twilio. TWILIO_WHATSAPP_FROM="INSERT YOUR TWILIO WHATSAPP FROM" TWILIO_AUTH_TOKEN="INSERT YOUR TWILIO TOKEN HERE" TWILIO_AUTH_SID="INSERT YOUR TWILIO SID HERE" ENV file with the database name that was just created. Here as an example, we will create a new database with the name whatsapp-laravel-twilio and then adjust the DB_DATABASE in the. If using XAMPP, we can directly create a new database at localhost/phpmyadmin. ![]() ![]() We need to create a new database to migrate the migration files to the database. Schema::create('users', function (Blueprint $table) _create_users_table.php, and add the code for the phone field as above. Please run the commands as above in sequence to install laravel ui package. For that, we will use the laravel ui package to generate the authentication feature. Install Laravel UI composer require laravel/uiīecause in this tutorial we have a scenario where the user will receive a WhatsApp notification after the user has successfully registered, so we need the authentication feature in our Laravel project. If the process is complete, now we can use the services of Twilio. Run the command as above to start installing the Twilio SDK package. To be able to use Twilio services in laravel 8, we need to install the Twilio SDK package. Install Twilio SDK Package composer require twilio/sdk If the installation process is complete, please enter the project with the command cd whatsapp-laravel-twilio. The command will create or generate a laravel project folder with the name whatsapp-laravel-twilio. Please open a terminal, then run the command as above. ENV file Install Laravel 8 composer create-project laravel/laravel whatsapp-laravel-twilioĪfter successfully setup the Twilio Testing Sandbox in the previous step, now let's start coding starting with installing the laravel version (currently version 8). * Save the whatsapp number from Twilio for us to setup in the. By successfully sending the message, we can already use the Sandbox from Twilio to start creating the WhatsApp notification feature in Laravel. To start using Sandbox from Twilio, please enter the Send a Whatsapp message menu in the Twilio dashboard sidebar menu (Messaging>Try it Out) then click the link click here.īy pressing or clicking the link, we will be directed to Whatsapp and please send a join excitement-ancient message. However, for development mode, we don't need to register an account and wait for verification from Whatsapp, we can use Twilio Sandbox to start developing or testing the WhatsApp notification sending feature using the Programmable Messaging API service from Twilio. Whatsapp will verify the data that we sent and will send the results of the verification whether it is approved or rejected (it is not Twilio who does the verification). To send whatsapp notification messages in production mode, we have to register an account by sending some of the requested data to Whatsapp. Testing Whatsapp Notification Feature in Laravel 8 with Twilio.The scenario in this experiment is quite simple, namely when the user successfully registers, it will send a WhatsApp notification to the user's WhatsApp number. Read: How to Create an SMS Broadcast or SMS Portal with Laravel 8 and Twilio For this experimental project, we can still use the credentials from what we got on the Twilio dashboard page, it's just that to use the Programmable Messaging API service from Twilio to make the WhatsApp notification send feature, there are a few steps that must be followed. In this article we will not discuss the flow of account registration on Twilio because in the previous article we discussed how to register a free trial account on Twilio. Whatsapp Laravel Twilio - After in the previous article we tried the Programmable Messaging API service from Twilio to create an SMS broadcast feature or SMS portal in laravel version 8, in this tutorial article we will try the service from Twilio to create a whatsapp notification feature in laravel version 8. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |