{"id":21558663,"url":"https://github.com/ghostzero/twitchmessenger","last_synced_at":"2025-03-18T03:41:03.106Z","repository":{"id":82068471,"uuid":"101582604","full_name":"ghostzero/TwitchMessenger","owner":"ghostzero","description":"Twitch Messenger Java API (inofficial)","archived":false,"fork":false,"pushed_at":"2018-04-26T09:32:27.000Z","size":146,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-24T10:47:34.836Z","etag":null,"topics":["api","chatbot","discontinued","twitchtv"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/ghostzero.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":"2017-08-27T21:53:40.000Z","updated_at":"2019-02-12T12:30:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b4f960e-ce84-4035-8b81-e8d814331797","html_url":"https://github.com/ghostzero/TwitchMessenger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2FTwitchMessenger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2FTwitchMessenger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2FTwitchMessenger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostzero%2FTwitchMessenger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostzero","download_url":"https://codeload.github.com/ghostzero/TwitchMessenger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244153327,"owners_count":20406995,"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":["api","chatbot","discontinued","twitchtv"],"created_at":"2024-11-24T08:15:31.887Z","updated_at":"2025-03-18T03:41:03.099Z","avatar_url":"https://github.com/ghostzero.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Discord](https://discordapp.com/api/guilds/373468864098336768/embed.png)](https://ghostzero.me/discord)\n\n# Twitch Messenger API\n\n## Setup\n\n### Enable Debug Console\n\nPush `F12` in your Twitch App (opens debug mode) and press `F5` to reload your client then navigate to your network tab.\n\n### Get UserID, MachineKey \u0026 SessionId\n\n![](docs/images/get_socket_infos.png)\n\n### Get AuthToken\n\nParse the Auth Token from the Cookie: ...; CourseAuthToken=`AuthToken` and decode with https://urldecode.org/\n\n![](docs/images/get_auth_token.png)\n\n### Get ClientId\n\n![](docs/images/get_client_id.png)\n\n## Example\n\n```java\nTwitchMessenger messenger = new TwitchMessenger(\n       \"userId\",\n       \"clientId\",\n       \"authToken\",\n       \"machineKey\",\n       \"sessionId\"\n);\n\nmessenger.setListener(new TwitchMessengerListener() {\n    public void onMessage(TwitchConversation conversation, String message) {\n        System.out.println(\"Message: \" + message);\n    }\n});\n\nmessenger.connect();\n\n// My example server: https://app.twitch.tv/servers/Mb3k7A\nTwitchServer server = messenger.getServer(\"7b0d11d5-717a-4311-9f68-355897b10628\");\nTwitchConversation conversation = server.getConversation(\"201647be-8be5-4b99-bac9-b7266ba561f6\");\n\nconversation.sendMessage(\"Hello World!\");\n\nScanner s = new Scanner(System.in);\nwhile (s.hasNext()) {\n    String line = s.nextLine();\n    if(line.equals(\"exit\") || line.equals(\"end\")) {\n        System.exit(0);\n    } else {\n        conversation.sendMessage(line);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostzero%2Ftwitchmessenger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostzero%2Ftwitchmessenger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostzero%2Ftwitchmessenger/lists"}