如何从 Instagram API 中提取 cookie [英] How to extract cookie from Instagram API
问题描述
我的任务是保存用户的故事,所以我正在研究 Instagram API.
现在我知道抓取用户的故事是非官方的,所以我们使用 https://i.instagram.com/api/v1/feed/reels_tray/
该请求需要一个包含 ds_user_id
和 sessionId
的 cookie.我试图从 Postman 那里获取它,但我所做的只是获取官方 API 的访问令牌.
我应该执行什么请求来存储它ds_user_id
和 sessionId
?
更新设法通过浏览器获取它,但不能通过邮递员获取.任何帮助将不胜感激.
你可以参考这个问题来了解如何使用拦截器:如何使用 Postman Interceptor
另请参阅有关在 Postman 中使用变量的文档::>
还有很棒的 - 社区支持
测试愉快!
I have this task to save user's strories, so I'm diiging into Instagram API.
For now I know that it's unofficial to grab user's story, so we are using https://i.instagram.com/api/v1/feed/reels_tray/
That request needs a cookie with ds_user_id
and sessionId
inside. I'm trying to grab it from Postman, but all I've managed to do is to get the access token to official API.
What request should I perform to store that
ds_user_id
and sessionId
?
UPD Managed to get it through browser, but not through postman. Any help would be appreciated.
Download the latest native Postman app or you can use the Chrome App
Install Postman Interceptor in chrome
You can start the interceptor and capture the cookies and store them in environment variables inside postman.
Use those variables in your requests.
You can refer this issue on how to use the interceptor: How to use Postman Interceptor
Also refer are the docs on using variables in Postman:
And the great - Community Support
Happy Testing!
这篇关于如何从 Instagram API 中提取 cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!