crunchy-labs / crunchyroll-rs

🦀 Pure Rust implementation of the Crunchyroll API
Apache License 2.0
63 stars 14 forks source link

Unable to authenticate? #40

Closed ipkpjersi closed 3 months ago

ipkpjersi commented 3 months ago

I tried using the code from #21 as a starting point as I am interested in exporting backups of my watch history over time, as I like to maintain ownership of my own data.

However,

When trying to authenticate like this:

async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // log in to crunchyroll with your username and password
    let crunchyroll = Crunchyroll::builder()
        .login_with_credentials("myemail", "mypassword")
        .await?;

with my valid working email address and password that I can log into the website with, when using that code it simply returns this: Error: Request(CrunchyrollErrorContext { message: "invalid_client (auth.obtain_access_token.client_inactive) - ", url: Some("https://www.crunchyroll.com/auth/v1/token"), value: None, extra: Some(401) })

Am I doing something wrong, is there an access token I need or something to use as the password? To me it seems like it should be working...

bytedream commented 3 months ago

Did you use the latest version (0.12.0)?

ipkpjersi commented 3 months ago

Oops, I was using an old version, that was it. It now works as expected. Thanks!

P.S. This is my first time trying out Rust, and I have to say, it does seem pretty nice.