pgrimaud/instagram-user-feed

graphql query error

raakkan opened this issue · 9 comments

Client error: GET https://www.instagram.com/graphql/query/?query_hash=472f257a40c653c64c666ce877d59d2b&first=12&id=4530240674 resulted in a 403 Forbidden response:\n
{"message": "forbidden", "status": "fail"}\

please see this problem

Hi @techshankar,

Unfortunately, I have no idea how to fix it.
I get the same error in the browser : https://www.instagram.com/graphql/query/?query_hash=472f257a40c653c64c666ce877d59d2b&first=12&id=4530240674

Any help could be nice...

That link works for me in the browser, perhaps instagram had a temporary issue?

Had the same issue with a node script I was running using node-fetch. After messing around with the cookies in my browser while hitting that url, it seems as though the one thing that makes or breaks the request is the inclusion of the cookie ig_pr=2. Of course, you will still get a cross-origin error even if you add that cookie to your own client-side requests, but it seems to work fine on the server-side for me when I manually add it to the request headers.

As for if that will continue to work into the future, 🤷‍♂️

@stevewpatterson Thanks for the cookie mate!

@techshankar Please upgrade to ^3.0, this will fix your problem. Beware of small breaking changes.

Unfortunately for me this hasn't fixed the issue either - perhaps they shut that down too?

@joshbmarshall Damn, you're right... 😞

I have to time to deal with it today, wait and see this thread on stack overflow
: https://stackoverflow.com/questions/49265339/instagram-a-1-url-doesnt-allow-max-id

Looks like they are now requiring a sessionId cookie. Unfortunately I don't know how the value for that cookie is generated

Cookie is not required anymore. So the release 3.0.0 is valid.