

Whats app wrapper code#

git commit -am "#27 Fix drawer not opening" Use the issue number in the commmit message if there is one, e.g.You will need to change the development team ( DevelopmentTeam =) by logging in with your Apple account (Xcode will prompt you when you try to debug), so don't include the project settings in your commit.Clear residue-free cast hand stretch film stretches up to 150, which contributes to its excellent resistance against tearing.
Whats app wrapper install#
Whats app wrapper mac#
WHATSAPP_API_TOKEN= WHATSAPP_NUMBER_ID=Īnd add the values provided on your Dashboard.This is a modified Version of ChitChat from stonesam92/ChitChat and was created, because he is no longer active.Ī Mac app wrapper around WhatsApp's web client, WhatsApp Web. env file at the root of the project and proved the following values. Running the projectĪs we are working with tokens and ids provided by WhatsApp API, it’s important to have them as environment variables.Ĭreate a. Let’s create and run the server with gunicorn and configure env variables. # app/whatsapp_client.py import os import requests import json class WhatsAppWrapper: API_URL = "" API_TOKEN = os.environ.get("WHATSAPP_API_TOKEN") NUMBER_ID = os.environ.get("WHATSAPP_NUMBER_ID") def _init_(self): self.headers =, ), 200 In this case, we’ll write a class called WhatsAppWrapper. It's always an interesting habit to write wrappers (classes or functions) when you will be interacting with external services. This file will contain a wrapper to interact with the Whatsapp Cloud API. Inside the app directory, create a file named whatsapp_client.py. This will tell Python that this is a package and it will help with imports. Overall, this is an easy procedure to follow. You can configure the fields in each tab, including Button > Box > Contacts > Display > Colors respectively.

This plugin has a step by step setting order. Next, create a new directory called app with a _init_.py file inside it. WhatsApp Social Chat for WordPress allows your customers to open a conversation from your website directly to your WhatsApp phone number. from dotenv import load_dotenv load_dotenv() Adding the Whatsapp Client This file will be helpful to load env variables. pip install Flask requests python-dotenv gunicorn Creating the Flask AppĪt the root of the project, create a config.py file. python3.10 -m venv venvĪnd activate the environment. mkdir flask-whatsapp-api cd flask-whatsapp-apiĪfter that, create a virtual environment. Create a new application under the name of the Meta business account.Ĭreate the directory that will contain the flask project.Link the WhatsApp business account to the Meta business account.Here is some documentation but I’ll give steps below: You need to configure a business account with Meta developers. Great, right? Let’s start with configuring the project and sending a template message. At the end of the series, we’ll have a Flask server deployed that can be used to send messages to a phone number but also received notifications via webhooks.
Whats app wrapper series#
In this series of articles, we will build a simple web service using Flask and the Cloud API. Meta has launched an API accessible for businesses or developers to extend their services or allow better communication.

Building a Web Service WhatsApp Cloud API & Flask: Sending Template Messages - Part 1
