想写一个sessionkey的测活页面,在使用F12检查请求时,发现https://api.claude.ai/api/organizations 使用了这个cookie并返回了用户信息,且在浏览器上登录账号之后,直接访问该网址,也可以拿到用户信息。
但是我通过F12->network->该请求->右键复制->以bash形式复制得到curl命令,之后运行时却提示:{“error”:{“message”:“We are unable to serve your request”,“type”:“permission_error”}} 。请求懂得佬解答
我获得的命令是:
curl 'https://api.claude.ai/api/organizations' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
-H 'accept-language: zh-CN,zh;q=0.9,ja;q=0.8' \
-H 'cache-control: max-age=0' \
-H 'cookie: xxxxxxxxxxxxxxx(包含sessionkey)' \
-H 'priority: u=0, i' \
-H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: document' \
-H 'sec-fetch-mode: navigate' \
-H 'sec-fetch-site: none' \
-H 'sec-fetch-user: ?1' \
-H 'upgrade-insecure-requests: 1' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36'