WHIN (Whatsapp Gateway) - New version (Beta)

Hello there,

I would like to share we are moving our whatsapp gateway (WHIN) to rapidAPI infrastructure.
It will still be free for home users, but we are leveraging rapidAPI tools to prevent abuse.
We'll be shortly posting instructions, flows and eventually new contrib nodes to migrate the existing users.

Find here the whin@rapidapi

What to do to start using whin@rapidAPI

1.- First thing you need to do is get subscribed (if you are just testing the API there is a free plan that you can choose).

2.- Once subscribed, you need to send a whatsapp text to: +34 605 797 764 including the string: whin-signup or click on this link to send it automatically: wa.me

3.- The bot will return a one-time-use 5 digits code as a response to your whatsapp. You have 30 minutes to POST the code on the /signup endpoint of the API. If you run out of time, you can request as many codes as you need (just repeat #2).

4.- Once the code is POSTed, the install process is completed and you can start sending/receiving whatsapps on whin API.

Here’s a link to a video with a step by step guide: whin signup on rapidAPI - YouTube

1 Like

How to send a message through the API

A basic POST http request will do. You need to include your rapidAPI user key and the message you want to send. The simplest type of message you can send is a text and the format will be a simple JSON like:

{ 'text' : 'Hello world!" }

I am linking a flow example for everyone's convenience:

Receiving whatsapp message in your NR with WHIN - Receive

A strong feature of WHIN v1 was the ability to forward the messages you send to the gateway right to your node-red environment.

v2 will be implementing different approaches to solution this feature. The free service includes the reception through a simple NR endpoint. For this feature to work, you need to follow these steps:

1.- Add a simple "http-in" node to receive and route your incoming messages and ensure you respond with a 200 code when receiving a message.

2.- Ensure your endpoint is accesible from the Internet. Bear in mind that if you are not using a specific tunnel to that route, you might be compromising your security to your NR. I'd advice not to expose the route just by forwarding your port to your NR host or docker.

3.- Let WHIN know what your http-in route is. For that, WHIN has a specific endpoint (addurl). You can just use rapidAPI website to register your route or use the following example flow to register it.

4.- Once registered, WHIN will be sending POST requests to your endpoint, forwarding the messages you send to WHIN number right to your Node-Red.

5.- Disble the service at your convenience just by placing a simple HTTP request to WHIN endpoint '/delurl'. You can do that through the rapidAPI web interface or directly in NR with this flow.

UPDATE - New npm with NR nodes has been published:

After a lot of users requestes, here is the new WHIN-Groups feature being documented as I write.
Watch this out: