Warning
*Old method - please refer to the new and better method.
To add a WhatsApp webhook:
Not as easy as the others.
You need to connect your WhatsApp account as if you were logging on WhatsApp Web.
To achieve this, you're going to use another docker-compose to self-host a WhatsApp HTTP API. I'm using this API.
Follow these steps:
$ cd /opt/chill
$ wget https://raw.githubusercontent.com/garnajee/home-server/master/whatsapp-api/old-method-docker-compose-whatsapp.yml
$ docker-compose --file old-method-docker-compose.yml up -d
Note
Note that the docker-compose I provided is not really optimized, you can add environment variable to better configure. You can check the documentation here.
Then follow the official from step 3 to 5. For any further information, like the id of a contact or a group, please read the documentation.
Go back to Jellyfin > Plugin > Webhook:
- click on "Add Generic Form Destination"
- "Webhook Url": the internal docker ip, if you don't change anything in the docker-compose it should be:
http://10.10.66.200:3000/api/sendText
- then check what you want depending on the template
Then copy and paste the template you want:
- "Item Added": whatsapp-items.handlebars
- (very basic) "User created/deleted": whatsapp-basic-user.handlebars
And finally you need to 2 Headers:
- "Key": "accept", "Value": "application/json"
- "Key": "Content-Type", "Value": "application/json"
Important
Please note, that we cannot send images with this API (it's a paid feature).
(The new method can).
And that's it, you can save.