Green API (WhatsApp API) integration
The Green API integration gives you the ability to subscribe to a channel WhatsApp users as recipients. You can send text notifications, images, links and files from the source services to your colleagues and customers through the stable WhatsApp API gateway.
Subscribers will receive messages from your WhatsApp account linked to Green API. This will expand the possibilities, e.g. let you brand notifications and adapt the service to business needs.
! The integration is designed to send notifications to phone numbers other than the sender number connected to the Green API. If you set it to be sent to the original (your own) number, messages will still be delivered to WhatsApp, but without a pop-up / sound notification. WhatsApp will automatically mark such messages as read since the sender number and the recipient number are the same.
View detailed instructions on how to set up a Green API account for WhatsApp notifications >>
For everything to work, you need to pre-configure the integration and enable subscription in the properties of the desired channel.
If at least one of these items has not been configured, you will see the following message at the stage of subscribing to the channel:
Step 1. Configure integration
- Go to the Integration screen. This can be done via the dropdown menu in the upper right corner of the screen. Make sure you are logged in to the system.
- Click on the Create button.
- Click on the Green API card.
- If necessary, edit the name of the integration, select API Version depending on your Green API plan: Base - for Free and Business , v1 - for ChatBot).
- Enter your Green API instance data to the IdInstance and ApiTokenInstance fields.
- Check the box next to Allow subscription over contact list if you want to be able to choose from the list of your WhatsApp contacts, including groups, at the subscription stage (Step 3).
- After clicking the Save button, the created integration will appear on the Integrations screen.
To view Green API instance data, in your Green API console, go to Instances and drop down to the required instance.
Not sure how to create A Green API account for WhatsApp notifications? Read the instructions below >>
Step 2. Allow subscription
- Go to the channel properties via the Edit button on the main screen of the Control Panel or on the channel screen.
- Check the box next to Green API in the Allow subscription via integration field and click the Save button. Green API will be displayed in this field only after successfully completing Step 1.
In the next step, you can add custom integration to the channel.
Step 3. Add the custom integration to the channel
After you have configured the Green API integration and allowed the subscription, you can add it to the selected channel as a recipient.
- On the channel screen, click the Subscribe button in the Recipients section.
- On the Channel subscription screen, select Green API.
- Enter the number you want to send notifications to or select a WhatsApp contact/group from the list (will be active if you have allowed this action in the Green API integration settings) and click Subscribe. To add more numbers, repeat the previous steps.
That's it! The subscription will now appear in the Recipients section of the channel screen, and notifications from your source services will begin to reach connected WhatsApp users.
Setting up Green API for WhatsApp notifications
How to create a Green API account?
- Register on the Green API website.
- Create a new instance using the Create Instance button in the upper right corner of the console.
- Choose a plan.
- Next, you will see the new instance screen. Here you will find data for configuring integration in Notify.Events: IdInstance and ApiTokenInstance.
How to connect WhatsApp to Green API?
In order for the instance to work, you need to associate the Green API with WhatsApp. Until you do this, the status of the instance will show as "Unauthorized".
- Scroll the instance screen below and click the Get QR button.
- Scan the generated QR code via WhatsApp on your smartphone: Settings > Linked devices > Link device.
- Now the status of the instance will change to “Authorized” and the connection with WhatsApp will start working.
You can change the instance settings on the same screen using the Edit button.
Congratulations, you have successfully connected Green API! Now you can go back to the top of the instructions and set up the integration to send notifications to WhatsApp.
- Getting started
-
Using Notify.Events
- Channels
- Sources
- Recipients
- Integrations
- Your account
-
Advanced options
- API
- Custom integrations