{"id":13758338,"url":"https://github.com/michidk/TwitchCSharp","last_synced_at":"2025-05-10T08:30:23.345Z","repository":{"id":31017012,"uuid":"34575493","full_name":"michidk/TwitchCSharp","owner":"michidk","description":"Twitch C# Wrapper for the Twitch v3 REST API","archived":false,"fork":false,"pushed_at":"2022-06-22T16:35:20.000Z","size":524,"stargazers_count":43,"open_issues_count":2,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-16T09:28:54.517Z","etag":null,"topics":["api","c-sharp","oauth","oauth-keys","rest","twitch","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michidk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-25T16:11:07.000Z","updated_at":"2024-05-06T20:03:24.000Z","dependencies_parsed_at":"2022-09-08T17:22:36.835Z","dependency_job_id":null,"html_url":"https://github.com/michidk/TwitchCSharp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2FTwitchCSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2FTwitchCSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2FTwitchCSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2FTwitchCSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michidk","download_url":"https://codeload.github.com/michidk/TwitchCSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389374,"owners_count":21900749,"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","c-sharp","oauth","oauth-keys","rest","twitch","wrapper"],"created_at":"2024-08-03T13:00:27.833Z","updated_at":"2025-05-10T08:30:23.022Z","avatar_url":"https://github.com/michidk.png","language":"C#","funding_links":[],"categories":["Libraries"],"sub_categories":["C#"],"readme":"# Twitch C# Wrapper for the Twitch v3 REST API\n\n## Notes\nIf you are using Twitch C# Wrapper for your project, please let me know! If there are many projects using this API, I will update it more frequently.\nIf you are interested in a Twitch C# API Wrapper with active support or Unity 5 integration for the new Twitch v5 API and are willing to pay for it, please [contact me](https://lohr-it.de/contact).\n\nFor news \u0026 updates, follow me on Twitter: [@miichidk](https://twitter.com/miichidk)\n\n## Projects Using Twitch C# Wrapper\n- [Simple Twitch Helper](https://github.com/michidk/SimpleTwitchHelper)\n\n## Documentation\nThis project is just a wrapper, so that you can interact with the Twitch REST API using C#.\nThat means that most of the methods are named and work like requests of the Twitch REST API.\nThe Twitch REST API is documented [here](https://dev.twitch.tv/docs/v3).\n\n## Usage\n### Client\nTo interact with the API you need at least a [client-ID](#oauth-key-/-client-id). Some requests can only be made by authorized users. These also need a [OAuth-key](#oauth-key-/-client-id).\n\nThere are three client classes:\n\n| Class                          | Explanation                                                            |\n| ------------------------------ | ---------------------------------------------------------------------- |\n| TwitchReadOnlyClient           | you can use this client without an auth-key to access public data      |\n| TwitchAuthenticatedClient      | needs to authenticate via auth-key, can access and change private data |\n\nThe TwitchReadOnlyClient can be used to read basic informations which are public on Twitch like the follower count of certain people.\nRequests which access data which is not public or do change something (e.g. the stream title) need authentication.\nFor these requests you should use the TwitchAuthenticatedClient. The authenticated client also has access to all TwitchReadOnlyClient methods.\nThe TwitchNamedClient is deprecated, since the TwitchAuthenticatedClient automatically fetches the username.\n\n### OAuth-Key / Client-ID\nYour client-ID is used to protect the twitch servers from spam-attacks. You can create one [here](http://www.twitch.tv/settings/connections) (scroll to the bottom).\n\nYou auth-key is used to authenticate you with the twitch servers. To generate one, just put your client-ID after \"client_id=\" in the URL and visit the following link:\n```\nhttps://api.twitch.tv/kraken/oauth2/authorize?response_type=token\u0026client_id=INSERT_YOUR_CLIENT_ID_HERE\u0026redirect_uri=http://localhost\u0026scope=user_read+user_blocks_edit+user_blocks_read+user_follows_edit+channel_read+c\nhannel_editor+channel_commercial+channel_stream+channel_subscriptions+user_subscriptions+channel_check_subscription+chat_login\n```\n\nYou will be redirected to a url like this:\n```\nhttp://localhost/#access_token=qxxxxtnc33456quxfghmcpw211s92xgp\u0026scope=user_read+user_blocks_edit+user_blocks_read+user_follows_edit+channel_read+channel_editor+channel_commercial+channel_stream+channel_subscriptions+user_subscriptions+channel_check_subscription+chat_login\n```\n\nYou can find your auth-key in the resulting url: `#access_token=qxxxxtnc33456quxfghmcpw211s92xgp`\nIf you create a service, you have to provide a web-frontend, for the users to get their auth-key. Auth-keys are bound to accounts and should not be shared.\n\nRead more about the Twitch authentication API [here](https://dev.twitch.tv/docs/v3/guides/authentication/).\n\n### Example\n```c#\n// create a new client with access to the account to the auth-key owner\nvar client = new TwitchAuthenticatedClient(\"client-id\", \"oauth-key\");\n\nclient.Follow(\"miichidk\");\t\t\t\t\t// the owner of the auth-key will follow the user 'michidk'\n\nforeach (var follower in client.GetFollowers(\"michidk\").List)\n{\n    Console.WriteLine(follower.User.Name);\t// print out all followers of the user 'michidk'\n}\n```\n\n## Dependencies\n- [RestSharp](http://restsharp.org/)\n- [Json.NET](http://www.newtonsoft.com/json)\n\n## License\nUsed some code from [Gibletto](https://github.com/gibletto).\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Misc\nCreated 2015 by Michael Lohr\n\n[![Analytics](https://ga-beacon.appspot.com/UA-63472612-13/readme)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichidk%2FTwitchCSharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichidk%2FTwitchCSharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichidk%2FTwitchCSharp/lists"}