https://github.com/ttfh/wa-cloud-api
WhatsApp Cloud Api implementation in React Native and Node.js
https://github.com/ttfh/wa-cloud-api
react-native whatsapp
Last synced: about 1 year ago
JSON representation
WhatsApp Cloud Api implementation in React Native and Node.js
- Host: GitHub
- URL: https://github.com/ttfh/wa-cloud-api
- Owner: TTFH
- Created: 2022-07-25T15:33:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T18:09:17.000Z (almost 4 years ago)
- Last Synced: 2025-03-30T03:51:11.890Z (over 1 year ago)
- Topics: react-native, whatsapp
- Language: JavaScript
- Homepage:
- Size: 1.66 MB
- Stars: 11
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WhatsApp Cloud Api implementation in React Native and Node.js
### A working application to send and receive WhatsApp, Messenger and Instagram messages* using Meta's Cloud Api


**Warning:** This application contains JS code, use at your own risk.
\* only text messages are currently implemented
## Installation
Install Node.js from https://nodejs.org/en/download/current/
If you are using Windows 7 use this version https://nodejs.org/dist/v14.16.1/node-v14.16.1-x64.msi
and create an Environment variable called: NODE_SKIP_PLATFORM_CHECK and set it to 1
Open a command prompt at the folder `wa-cloud-api`
Install the dependencies with the command `npm install` (it will take a while)
## Run the front
Execute `npm start`
Then type 'w'
## Run the server
Open a command prompt at the folder `Server`
`node server.js`
Open another command prompt at the folder `Server`
`ngrok http --region eu 3000`
Open http://localhost:4040/ in your browser and copy your server URL
## Configure Meta's WhatsApp Cloud API
First, you need a Facebook account :(
Go to https://developers.facebook.com/ and create an App of type Business
Click on Add Product and select WhatsApp
Go to Getting started and copy your Temporary access token and your Phone number ID to Server/server.js (you can also get a permanet token)
Go to Configuration and edit your Callback URL, add your server URL (https://???.eu.ngrok.io/webhook) and set your Verify token from Server/server.js