whisper icon indicating copy to clipboard operation
whisper copied to clipboard

Question about the latest api update.

Open muhitrhn opened this issue 1 year ago • 4 comments

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 avatar Apr 17 '23 02:04 muhitrhn

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

muhitrhn avatar Apr 19 '23 06:04 muhitrhn

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.

p1atdev avatar Apr 19 '23 11:04 p1atdev

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.

muhitrhn avatar Apr 19 '23 14:04 muhitrhn

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?

vicnaum avatar Mar 11 '24 10:03 vicnaum