-
Notifications
You must be signed in to change notification settings - Fork 189
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
x-instagram-gis 💥 #30
Comments
From what I found in their JS Currently x-instragram-gis is an md5, window._sharedData.rhx_gis + ':' + window._sharedData.config.csrf_token + ':' + path window._sharedData.rhx_gis is an md5 Problem Example for an hashtag GET /explore/tags/hello/ MD5("5641c11aeb7f211ec1ac05193a687b84:8d509c28896865f8640f328f30f15721:/explore/tags/hello/") |
Some endpoints, like this important https://www.instagram.com/zuck/?__a=1 |
You are right, for the moment I'v listed few endpoints that need that header.
The main issue with this change, is the need of the original gis token, which is present in the initial html payload but not generated. If you delete this value, the web version of instagram actually 403 and then force reload the page :/ |
any new infos? |
Has Instagram changed something again? |
calculate the x-instagram-gis Example |
https://github.com/jlobos/instagram-web-api/blob/master/lib/index.js#L95-L103 async _getGis(path) {
const { rhx_gis, config: { csrf_token } } =
this._sharedData || (await this._getSharedData(path))
return crypto
.createHash('md5')
.update(`${rhx_gis}:${csrf_token}:${path}`)
.digest('hex')
} |
Apparently, they've stopped using the CSRF token for the "gis" hash. I've just tried @WINBIGFOX 's suggestion, and it works. |
now i have this error: Missing token 'user-agent' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel my code:
any idea how to fix it? |
there are so much new info about new headers. When the lib will be fixed? Because I use this API in my final project and this makes me mad, because I can't develop it more =( |
@tresdosdos Does your project use the version from npm or the latest master branch? The master branch works fine currently but I don't think the changes have been published to npm yet. In order to use it you need to install it like this:
|
Thanks so much
сб, 21 апр. 2018 г., 8:30 Ivaylo Stoyanov <notifications@github.com>:
… @tresdosdos <https://github.com/tresdosdos> Does your project use the
version from npm or the latest master branch? The master branch works fine
currently but I don't think the changes have been published to npm yet. In
order to use it you need to install it like this:
npm install jlobos/instagram-web-api
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AinH5ZQ0oNi5wO8H169mVYZxUEjp1hhKks5tqsP6gaJpZM4TRDvg>
.
|
[edit: delete] |
seem its not work anymore |
New header of authentication
The text was updated successfully, but these errors were encountered: