{"id":37035875,"url":"https://github.com/xuhaojun/linebotsdkx","last_synced_at":"2026-01-14T04:15:16.460Z","repository":{"id":246322928,"uuid":"820714615","full_name":"XuHaoJun/linebotsdkx","owner":"XuHaoJun","description":"C# line bot sdk","archived":false,"fork":false,"pushed_at":"2024-07-16T02:20:52.000Z","size":441,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-11T09:59:09.387Z","etag":null,"topics":["csharp","linebot","openapi","openapi-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XuHaoJun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-27T03:22:23.000Z","updated_at":"2024-07-30T07:47:49.000Z","dependencies_parsed_at":"2024-07-16T05:29:42.278Z","dependency_job_id":null,"html_url":"https://github.com/XuHaoJun/linebotsdkx","commit_stats":null,"previous_names":["xuhaojun/linebotsdkx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XuHaoJun/linebotsdkx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuHaoJun%2Flinebotsdkx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuHaoJun%2Flinebotsdkx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuHaoJun%2Flinebotsdkx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuHaoJun%2Flinebotsdkx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XuHaoJun","download_url":"https://codeload.github.com/XuHaoJun/linebotsdkx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuHaoJun%2Flinebotsdkx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["csharp","linebot","openapi","openapi-generator"],"created_at":"2026-01-14T04:15:15.706Z","updated_at":"2026-01-14T04:15:16.451Z","avatar_url":"https://github.com/XuHaoJun.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linebotsdkx\n\nC# line bot sdk.\n\nCode generated by [openapi-generator](https://github.com/OpenAPITools/openapi-generator), and spec from [line-openapi](https://github.com/line/line-openapi).\n\n## QuickStart\n\n```sh\ndotnet add package Linebotsdkx.MessagingApi\n```\n\n```c#\nusing Linebotsdkx.MessagingApi.Api;\nusing Linebotsdkx.MessagingApi.Model;\n\nvar client = new MessagingApiApi\n(\n    new Linebotsdkx.MessagingApi.Client.Configuration()\n    {\n        DefaultHeaders = new Dictionary\u003cstring, string\u003e\n        {\n            { \"Authorization\", \"Bearer \" + \"\u003cYOUR_CHANNEL_ACCESS_TOKEN\u003e\" },\n        }\n    }\n);\nvar body = new BroadcastRequest\n(\n    new List\u003cMessage\u003e\n    {\n      new TextMessage(type: \"text\", text: \"hello\"),\n      new TextMessage(type: \"text\", text: \"world!\")\n    },\n);\nvar resp = await client.BroadcastAsync(body);\n\n\n\n\n// Imagemap with PushMessageAsync example\n// example image form https://github.com/isdaviddong/HOL-LineBotSDK/blob/master/basic/Lab%2003%3A%E5%A6%82%E4%BD%95%E7%99%BC%E9%80%81ImageMap%E8%A8%8A%E6%81%AF.md\n\nvar body2 = new PushMessageRequest(\n    to: \"\u003cYOUR_LINE_USER_ID\u003e\",\n    messages: new List\u003cMessage\u003e\n    {\n        new ImagemapMessage(\n            type: \"imagemap\",\n            baseUrl: \"https://i.imgur.com/leKztCj.png\",\n            altText: \"test\",\n            baseSize: new ImagemapBaseSize(1040, 1040),\n            actions:\n              new List\u003cImagemapAction\u003e\n              {\n                new URIImagemapAction(\n                  type: \"uri\",\n                  linkUri: \"https://zh.wikipedia.org/wiki/%E9%B6%AF%E6%AD%8C%E5%8D%80\",\n                  area: new ImagemapArea(0, 0, 500, 1040)\n                ),\n                new URIImagemapAction(\n                  type: \"uri\",\n                  linkUri: \"https://zh.wikipedia.org/wiki/%E5%85%AB%E5%BE%B7%E5%8D%80\",\n                  area: new ImagemapArea(0, 0, 1040, 1040)\n                )\n              }\n        )\n    }\n);\nvar resp2 = await client.PushMessageAsync(body2);\n```\n\n## Webhook echo example\n\n```sh\ndotnet add package Linebotsdkx.Webhook\ndotnet add package Linebotsdkx.MvcUtility\n```\n\n```c#\npublic class LineController : ControllerBase\n{\n    [HttpPost]\n    public async Task\u003cIActionResult\u003e Post()\n    {\n        if (!(await Linebotsdkx.MvcUtility.SignatureValidationAsync(this, \"\u003cYOUR_CHANNEL_SECRET\u003e\")))\n        {\n            // invalid\n            return BadRequest();\n        }\n        var body = await Linebotsdkx.MvcUtility.WebhookResultDeserializeAsync(this);\n        Console.WriteLine(body.Events); // webhook event objects from LINE Platform\n        Console.WriteLine(body.Destination); // user ID of the bot\n        foreach (var x in body.Events)\n        {\n            if (x is MessageEvent \u0026\u0026 x.Source is UserSource)\n            {\n                var messageEvent = x as MessageEvent;\n                if (messageEvent.Message is TextMessageContent)\n                {\n                  var userSource = x.Source as UserSource;\n                  var textMessageContent = messageEvent.Message as TextMessageContent;\n                  var echoBody = new PushMessageRequest(\n                      to: userSource.UserId,\n                      messages: new List\u003cMessage\u003e\n                      {\n                          new TextMessage(type: \"text\", text: textMessageContent.Text ),\n                      }\n                  );\n                  await client.PushMessageAsync(echoBody);\n                }\n            }\n        }\n    }\n}\n```\n\n## Development\n\nexec `run.sh` that will use `openapi-generator` generate code.\n\n## Issues\n\n- [[csharp-netcore] Incorrect JsonConverter attribute added to polymorphic sub-classes](https://github.com/OpenAPITools/openapi-generator/issues/15302)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhaojun%2Flinebotsdkx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuhaojun%2Flinebotsdkx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuhaojun%2Flinebotsdkx/lists"}