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

Instagram Probably Changed their User Cookies #134

Open
Seeker220 opened this issue Jun 18, 2024 · 15 comments
Open

Instagram Probably Changed their User Cookies #134

Seeker220 opened this issue Jun 18, 2024 · 15 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Seeker220
Copy link

So, few days back, Instagram logged me out and banned me. So, I applied for a review, and also made a backup new account. After 3-4 days, I got back the previous account. But the thing is Instagram seems to have changed its cookie settings. I can't find a single entry in Network Tab of Chrome Dev Tools with "reel". So, this FAQ is flawed probably. What I don't know is whether Instagram did this just for me? Or is this happening to all?

@axellencyDE
Copy link

It is happening to me, too! I haven't been banned though. I was logged out - as it happened many times before - but this time, it find nothing related to ?reel_id= anymore. This broke the tool for me! Been the case for a few days now.

@Seeker220
Copy link
Author

though if you search for cookie and other things in the network tab and put their values, they still do work!

@chriskyfung
Copy link
Owner

Hi @Seeker220 and @axellencyDE,

Sounds like you've had quite an experience with Instagram recently. To better figure out what's going on, could you share some more details and maybe a few screenshots? This will help identifying if Instagram's cookie settings have changed for everyone or just for you.

I use the app script daily without any issues, so I'm not sure how to replicate your problem. Your screenshots and details will be super helpful for us to dig deeper into this.

Thanks a bunch!

@Seeker220
Copy link
Author

Seeker220 commented Jul 12, 2024

okay so as far as i observed, reel named entries are no more in network tab, but there are entries named "query" that has all the properties of reel entries except that it doesn't have x-ig-www-claim
and x-ig-www-claim can be found from somewhere else, and if u use those values into the google sheets, you can download story just like before...
i'm giving screenshot tomorrow morning😅

@chriskyfung chriskyfung added bug Something isn't working question Further information is requested labels Jul 13, 2024
@royjor2016
Copy link

okay so as far as i observed, reel named entries are no more in network tab, but there sre entries named "query" that has all the properties of reel entries except that it doesn't have x-ig-www-claim and x-ig-www-claim can be found from somewhere else, and if u use those values into the google sheets, you can download story just like before... i'm giving screenshot tomorrow morning😅

exactly this.
i cant find x-ig-www-claim .

@Seeker220
Copy link
Author

Seeker220 commented Jul 13, 2024

So thing is I haven't used the story downloader some days, and apparently Instagram has removed "x-ig-www-claim" completely.
Also, there are some new properties of "query" entries like : "X-Bloks-Version-Id", "X-Fb-Friendly-Name", "X-Fb-Lsd".

Here are the Screenshots:

  1. Filter results "reel" in network tab:
image
  1. Filter results "query" in network tab:
image
  1. Search results "x-ig-www-claim" in network tab:
image
  1. Search results "x-asbd-id" in network tab:
image
  1. Search results "x-csrftoken" in network tab:
image
  1. Search results for "x-ig-app-id" in network tab:
image
  1. Search results for "cookie" in network tab:
image
  1. So as we can observe, two entries "graphql" and "query" resemble with previous reel entries.

  2. Request Headers for "query" (Redacted):
    query request headers.txt

  3. Request Headers for "graphql" (Redacted):
    graphql request headers.txt

So today I ran the script and used the last "x-ig-www-claim" value and it worked and downloaded story successfully. I think you have to add some more params to request-headers and remove x-ig-www-claim.
Please repair this for us :) Big fan, this helped me a lot :)

@chriskyfung
Copy link
Owner

Hi @Seeker220,

Thanks for the heads-up and for being such a big fan!

So, I see there's been a major change in the API. The site switched from a RESTful API to a GraphQL API. The new endpoint /graphql/query, is used for a bunch of stuff now, not just story data. Also, reel_ids are now sent through a JSON payload, with a batch of new parameters, instead of a URL query string.

Given these changes, resolving the issue will require more than just tweaking the request headers. It may take some time to implement a proper fix. Thanks for your patience and understanding!

@chriskyfung chriskyfung pinned this issue Jul 15, 2024
@royjor2016
Copy link

@Seeker220 thx a lot for your tips. recycling an old www-claim value does work for me just now.

@sacramentosweater
Copy link

Now insta uses websockets for realtime update explore that front

@chriskyfung
Copy link
Owner

Hi @sacramentosweater

Thank you for the information! However, I'm not familiar with web sockets. Could you provide more context or explain what they are?

@sacramentosweater
Copy link

Ahh Seems that was a false positive on my side and your above explanation still is most valid.

So, I see there's been a major change in the API. The site switched from a RESTful API to a GraphQL API. The new endpoint /graphql/query, is used for a bunch of stuff now, not just story data. Also, reel_ids are now sent through a JSON payload, with a batch of new parameters, instead of a URL query string.

@sacramentosweater
Copy link

Can anyone try this to get __ig_www_claim and use its value in x-ig-www-claim
image

And you can get rest of values

cookies
x-asbd-id
x-csrftoken
x-ig-app-id

From any of the query
image

worked for me if anyone else can confirm if it works for them and test it would be great

@Seeker220
Copy link
Author

worked for me if anyone else can confirm if it works for them and test it would be great
@sacramentosweater Yeah it worked for me as well, although the name of key for me was www_claim_v2...

@agnivadas
Copy link

Put value of x-ig-www-claim '0', it would work, x-ig-app-id and x-asbd-id remains .

@chriskyfung
Copy link
Owner

Put value of x-ig-www-claim '0', it would work, x-ig-app-id and x-asbd-id remains .

Unexpected 😲 Thanks for your information!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants