{"id":32211729,"url":"https://github.com/domm/net-matrix-webhook","last_synced_at":"2025-10-22T06:55:11.373Z","repository":{"id":56839465,"uuid":"253112463","full_name":"domm/Net-Matrix-Webhook","owner":"domm","description":"A http-\u003ematrix webhook","archived":false,"fork":false,"pushed_at":"2021-01-03T16:37:28.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-20T23:08:02.957Z","etag":null,"topics":["hacktoberfest","matrix"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/domm.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-04T22:43:03.000Z","updated_at":"2021-01-03T16:37:26.000Z","dependencies_parsed_at":"2022-08-29T05:00:51.183Z","dependency_job_id":null,"html_url":"https://github.com/domm/Net-Matrix-Webhook","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/domm/Net-Matrix-Webhook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FNet-Matrix-Webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FNet-Matrix-Webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FNet-Matrix-Webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FNet-Matrix-Webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domm","download_url":"https://codeload.github.com/domm/Net-Matrix-Webhook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domm%2FNet-Matrix-Webhook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280395517,"owners_count":26323515,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest","matrix"],"created_at":"2025-10-22T06:55:08.814Z","updated_at":"2025-10-22T06:55:11.368Z","avatar_url":"https://github.com/domm.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nNet::Matrix::Webhook - A http-\u003ematrix webhook\n\n# VERSION\n\nversion 0.901\n\n# SYNOPSIS\n\n    Net::Matrix::Webhook-\u003enew({\n      matrix_home_server =\u003e 'matrix.example.com',\n      matrix_user        =\u003e 'your-bot',\n      matrix_password    =\u003e '12345',\n      http_port          =\u003e '8765', # = default\n    })-\u003erun;\n\n    # or use the wrapper script http2matix.pl included in this distribution\n    http2matrix.pl --matrix_home_server matrix.example.com --matrix_user your-bot --matrix_password 12345\n\n    # Then send your requests\n    curl http://localhost:8765/?message=hello%2C%20world%21\n\n# DESCRIPTION\n\nL\\[matrix|https://matrix.org/\\] is an open network for secure, decentralized communication. A bit like IRC, but less 90ies.\n\n`Net::Matrix::Webhook` implements a webhook, so you can easily post messages to your matrix chat rooms via HTTP requests. It uses [IO::Async](https://metacpan.org/pod/IO%3A%3AAsync) to start a web server and connect as a client to matrix. It will then forward your messages.\n\nPer default, everybody can now post to this endpoint. If you want to add a tiny bit of \"security\", you can pass a `secret` to `Net::Matrix::Webhook`. If you do this, you will also have to send a `token` consisting of a `sha1_hex` of the message and the secret:\n\n    my $token = sha1_hex( encode_utf8($msg), $secret );\n    request('http://localhost:8765/?message=hello%2C%20world%21\u0026token='.$token);\n\n# OPTIONS\n\nIf you use [http2matrix](https://metacpan.org/pod/http2matrix), you can pass the options either via the commandline as `--option` or via ENV as `OPTION`, for example `--matrix_home_server matrix.example.com` or `MATRIX_HOME_SERVER=matrix.example.com`\n\n## matrix\\_home\\_server\n\nRequired.\n\nThe hostname of your matrix home server. Without the protocol!\n\n## matrix\\_room\n\nRequired. Example: `#dev:example.net`\n\nThe room you want the bot to join. The bot-user has to be invited to this room.\n\nTo get the room address, use [riot](https://metacpan.org/pod/riot), go to the \"room settings\" and find the \"main address\" in \"published addresses\". You might need to set it first via \"local address\" - \"add\".\n\n## matrix\\_user\n\nRequired.\n\nThe user name of your bot. You will have to set up an account for this user on your matrix home server.\n\n## matrix\\_password\n\nRequired.\n\nThe password of your bot.\n\n## http\\_port\n\nOptional. Default: 8765\n\nThe HTTP port the webserver will use.\n\n## secret\n\nOptional.\n\nA shared secret to calculate / validate the optional `token` parameter, for a little bit of \"security\".\n\n# OUTPUT\n\nOutput happens via `Log::Any`.\n\nIf you use [http2matrix.pl](https://metacpan.org/pod/http2matrix.pl), you can use  environment vars `LOGADAPTER` and `LOGLEVEL` to finetune the output.\n\n# SEE ALSO\n\n- [https://matrix.org/](https://matrix.org/)\n- [Net::Async::Matrix](https://metacpan.org/pod/Net%3A%3AAsync%3A%3AMatrix)\n\n# THANKS\n\nThanks to\n\n- [validad.com](https://www.validad.com/) for supporting Open Source.\n\n# AUTHOR\n\nThomas Klausner \u003cdomm@plix.at\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2020 - 2021 by Thomas Klausner.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomm%2Fnet-matrix-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomm%2Fnet-matrix-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomm%2Fnet-matrix-webhook/lists"}