Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/httpjamesm/matrixhook
A simple and fast Matrix webhook bot made in Golang.
https://github.com/httpjamesm/matrixhook
gin go matrix webhook
Last synced: 1 day ago
JSON representation
A simple and fast Matrix webhook bot made in Golang.
- Host: GitHub
- URL: https://github.com/httpjamesm/matrixhook
- Owner: httpjamesm
- Created: 2022-03-22T00:22:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T19:41:22.000Z (over 2 years ago)
- Last Synced: 2024-11-23T01:44:10.853Z (2 months ago)
- Topics: gin, go, matrix, webhook
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# matrixhook
A simple and fast Matrix webhook bot made in Golang.
## Deployment
1. Move `.env.example` to `.env` and fill in the variables
2. Run with `go run .` or build it and execute the binary
3. (Optional) Add the `WEBSERVER_PRESHARED_KEY` environment variable in `.env` to require authentication.## Usage
Send a POST request to the webserver (`/send`) with the following JSON formatted body:
```json
{
"content": "this is my webhook message!"
}
```The bot will then forward the content to the room ID of choice.
If `WEBSERVER_PRESHARED_KEY` is set, add the preshared key to the `authorization` header of the request.
## Attribution
- [Mautrix Go](https://github.com/mautrix/go)
- [go-gin](https://github.com/gin-gonic/gin)