因此,我需要为我的父母编写一些代码,以阻止我的兄弟玩不合适的游戏!但是我甚至不能通过roblox api (https://presence.roblox.com/v1/presence/users)请求他在播放什么,我一直收到以下错误
errors: [
{
code: 0,
message: 'Authorization has been denied for this request.'
}
]
}
我使用的代码是
const fetch = require('node-fetch')
fetch("https://presence.roblox.com/v1/presence/users", {
method: 'POST',
headers: {
'X-CSRF-TOKEN': fetch.headers,
Accept: "application/json",
"Content-Type": "application/json",
Cookie: ".ROLOSECURITY=_|[RobloxSecurityCodeHere]",
},
body: "{ \n \"userIds\": [ \\ \n 616975163 \\ \n ] \\ \n }"
})
.then(res => {
return res.json()
})
.then(data => console.log(data))
.catch(error => console.log('Error Retying!'))
我想知道如何在不使用代理的情况下修复这个错误!请帮帮我!
发布于 2020-08-29 08:45:16
如果这是用于游戏,则允许工作室访问api服务
https://stackoverflow.com/questions/63609279
复制相似问题