{"id":20727821,"url":"https://github.com/mazzz1y/go-matrix-webhook","last_synced_at":"2025-09-10T00:35:03.939Z","repository":{"id":218156049,"uuid":"691501886","full_name":"mazzz1y/go-matrix-webhook","owner":"mazzz1y","description":"Send matrix messages via webhook","archived":false,"fork":false,"pushed_at":"2023-09-14T10:18:03.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T02:51:05.953Z","etag":null,"topics":["element","im","matrix","synapse","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mazzz1y.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-14T10:01:35.000Z","updated_at":"2025-02-20T17:41:27.000Z","dependencies_parsed_at":"2024-01-20T04:11:55.624Z","dependency_job_id":"d4c306f6-c10f-4a8a-a759-efa59e78c5de","html_url":"https://github.com/mazzz1y/go-matrix-webhook","commit_stats":null,"previous_names":["mazzz1y/go-matrix-webhook"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazzz1y%2Fgo-matrix-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazzz1y%2Fgo-matrix-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazzz1y%2Fgo-matrix-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazzz1y%2Fgo-matrix-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazzz1y","download_url":"https://codeload.github.com/mazzz1y/go-matrix-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250499445,"owners_count":21440632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["element","im","matrix","synapse","webhook"],"created_at":"2024-11-17T04:34:19.948Z","updated_at":"2025-04-23T19:29:52.334Z","avatar_url":"https://github.com/mazzz1y.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-Matrix-Webhook\n\nGo-Matrix-Webhook is a lightweight and easy-to-use Matrix bot that allows you to send messages to a Matrix room using a simple POST request. It's perfect for integrating with other services, automating notifications, or even building your own custom applications.\n\n## Installation\n\n### Docker\n\nRun the Docker container:\n\n```bash\ndocker run -d --name go-matrix-webhook \\\n  -p 8080:8080 \\\n  -e LISTEN_ADDR=\"0.0.0.0\" \\\n  -e LISTEN_PORT=\"8080\" \\\n  -e LISTEN_PATH=\"/\" \\\n  -e SECRET_HEADER=\"your_secret_header\" \\\n  -e MATRIX_ACCESS_TOKEN=\"your_matrix_access_token\" \\\n  -e MATRIX_ID=\"your_matrix_id\" \\\n  -e MATRIX_URL=\"your_matrix_url\" \\\n  ghcr.io/mazzz1y/go-matrix-webhook:latest\n```\n\nReplace `your_secret_header`, `your_matrix_access_token`, `your_matrix_id`, and `your_matrix_url` with the appropriate values.\n\n### Download from GitHub Releases\n\n1. Download and extract the latest release binary for your platform from the [GitHub Releases](https://github.com/mazzz1y/go-matrix-webhook/releases) page.\n\n2. Run the binary:\n\n```bash\n./go-matrix-webhook\n```\n\n## Configuration\n\nYou can configure Go-Matrix-Webhook using the following environment variables:\n\n- `LISTEN_ADDR`: The address on which the webhook server listens (default: \"0.0.0.0\").\n- `LISTEN_PORT`: The port on which the webhook server listens (default: 8080).\n- `LISTEN_PATH`: The path on which the webhook server listens (default: \"/\").\n- `SECRET_HEADER`: Pre-shared `X-Secret` security header.\n- `MATRIX_ACCESS_TOKEN`: The access token for your Matrix account.\n- `MATRIX_ID`: Your Matrix user ID.\n- `MATRIX_URL`: The URL of the Matrix homeserver.\n\nAlternatively, you can set these options using command-line flags. Run `./go-matrix-webhook --help` for more information.\n\n## Usage\n\n### Create access token\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"type\": \"m.login.password\", \"identifier\": {\"type\": \"m.id.user\", \"user\": \"\u003cbot username\u003e\"}, \"password\": \"\u003cbot password\u003e\", \"initial_device_display_name\": \"Webhook Client\"}' \"https://\u003cyour-server\u003e/_matrix/client/r0/login\"\n```\nGet the `access_token` from the curl output and pass it into this application along with other required variables. Don't forget to add the bot to your room!\n### Send Messages\n\nTo send a message, simply make a POST request with the following structure:\n\n```bash\ncurl -X POST -H 'X-Secret: \u003cyour_secret_header\u003e' -H \"Content-Type: application/json\" -d '{\"message\": \"\u003cyour_message\u003e\", \"room_id\": \"\u003cyour_room_id\u003e\"}' \"http://\u003cyour_webhook_server\u003e:\u003cyour_webhook_port\u003e\"\n```\n\nReplace `\u003cyour_secret_header\u003e`, `\u003cyour_message\u003e`, `\u003cyour_room_id\u003e`, `\u003cyour_webhook_server\u003e`, and `\u003cyour_webhook_port\u003e` with the appropriate values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazzz1y%2Fgo-matrix-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazzz1y%2Fgo-matrix-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazzz1y%2Fgo-matrix-webhook/lists"}