#oauth #twitch #async #asynchronous #api


Library for talking with the new Twitch API aka. "Helix", EventSub and more!

7 releases

0.7.0-rc.7 Sep 17, 2023
0.7.0-rc.6 May 1, 2023
0.7.0-rc.4 Jan 21, 2023
0.7.0-rc.3 Dec 19, 2022
0.1.1 Apr 3, 2017

#251 in Web programming

Download history 124/week @ 2023-10-19 133/week @ 2023-10-26 71/week @ 2023-11-02 69/week @ 2023-11-09 113/week @ 2023-11-16 94/week @ 2023-11-23 129/week @ 2023-11-30 116/week @ 2023-12-07 136/week @ 2023-12-14 119/week @ 2023-12-21 131/week @ 2023-12-28 155/week @ 2024-01-04 121/week @ 2024-01-11 113/week @ 2024-01-18 77/week @ 2024-01-25 69/week @ 2024-02-01

423 downloads per month


25K SLoC

Twitch API | Rust library for talking with the new Twitch API aka. "Helix", EventSub and more!


See documentation for more info.

You can see current unpublished docs for the main branch here: local-docs

See examples for examples. If you want to run them locally, make sure you get the git submodules first.

use twitch_api::helix::HelixClient;
use twitch_api::twitch_oauth2::{AccessToken, UserToken};

async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
    // Create the HelixClient, which is used to make requests to the Twitch API
    let client: HelixClient<reqwest::Client> = HelixClient::default();
    // Create a UserToken, which is used to authenticate requests
    let token = UserToken::from_token(&client, AccessToken::from("mytoken")).await?;

        "Channel: {:?}",
        client.get_channel_from_login("twitchdev", &token).await?



This crate was previously available as twitch_api2 and has since been renamed to twitch_api


This crate aims to target

This crate should also be able to be used for

There are no current plans to support

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~346K SLoC