A very basic incoming webhook for Matrix
Go to file
Dave Umrysh a2e6d171a1 first commit 2021-03-19 12:16:21 -06:00
incoming_webhook first commit 2021-03-19 12:16:21 -06:00
.htaccess first commit 2021-03-19 12:16:21 -06:00
LICENSE first commit 2021-03-19 12:16:21 -06:00
README.md first commit 2021-03-19 12:16:21 -06:00
base-config.yaml first commit 2021-03-19 12:16:21 -06:00
maubot.yaml first commit 2021-03-19 12:16:21 -06:00

README.md

incoming webhook

An incoming webhook maubot based on the maugitea plugin

WARNING: This bot is still under development, so things may change, break, or even work properly.

Install & Run

icoming_webhook: just a regular plugin, zip it and upload it.

Webhooks

url: https://fancy.domain/_matrix/maubot/plugin/<instance_name>/webhook/r0?room=<room-id>

Add the secret to base-config.yaml

  • webhook-secret: "your secret here"

Bot usage

Add the bot to the room and then when you POST a message to the webhook URL the bot will post the message to the room.

Example:

<?php
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$web_hook_url);
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array('secret' => $web_hook_secret, 'message' => "Here is a test message ")));
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
	$result = curl_exec($ch);
	curl_close($ch);
?>