Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the latest api update. #10

Open
muhitrhn opened this issue Apr 17, 2023 · 4 comments
Open

Question about the latest api update. #10

muhitrhn opened this issue Apr 17, 2023 · 4 comments

Comments

@muhitrhn
Copy link

Hey @p1atdev thank you very much for this awesome library. Do you think the v1.1 api is still useable with the web client token after twtters recent update?

@muhitrhn
Copy link
Author

And if I use the web client token without providing guest-id or cookie will it cause any issues? @p1atdev

@p1atdev
Copy link
Owner

p1atdev commented Apr 19, 2023

The api endpoints which this library uses are not official endpoints, so it needs guest-id to check whether a request came from browser. I don't know can be used v1.1 endpoint with correct token because I haven't tried it...
Cookie is not needed always but maybe it can be used for emulate a user operation.

@muhitrhn
Copy link
Author

The api endpoints which this library uses are not official endpoints, so it needs guest-id to check whether a request came from browser.

I'm aware of that no worries.

I don't know can be used v1.1 endpoint with correct token because I haven't tried it... Cookie is not needed always but maybe it can be used for emulate a user operation.

I actually tried the token directly with v1.1 endpoints and seems some basic endpoints such as getting tweet, userTimeline etc works. I'm just curious if it will keep working cause worried they might completey shutdown v1.1. Or maybe they ban my ip for constant use of the token. I'm thinking of using proxy for each call but the only thing worried about is existence of v1.1 in future. As you know they have totally fucked up the API access, only 1% we get now by paying $100 which we used to get for free.

@vicnaum
Copy link

vicnaum commented Mar 11, 2024

Currently it fails with Error: Cannot get api.*.js id on:

    // get api.*..js from html
    // the format is `api:"9eacf99",`
    const apiJsId = htmlText.match(/api:"([^"]+)",/);
    Deno.writeTextFileSync("log.html", htmlText);
    if (apiJsId === null) {
      throw new Error("Cannot get api.*.js id");
    }

So I guess things changed and Twitter is no longer giving the api js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants