I recently started to work with the roblox api, It's been going good so far but I can't login. I tried to set the cookie by doing apiCall.headers.set-cookie = cookie, But that doesn't seem to work. How can I solve this issue?
Would I have to get set-cookie then edit it? i.g
const cookieSet = await apiCall.headers.get("set-cookie") cookieSet = cookie If I made it difficult to understand, I'll try to make it more clear How would I post a cookie to a roblox API?
My code:
if (!cookie.startsWith("_|WARNING:")) { throw new Error("Make sure your token is correct") } const cookies = { headers: { cookie: cookie } } await fetch("https://www.roblox.com", cookies) const thing = await fetch('https://api.roblox.com/currency/balance', cookies).then(res => res.json()) console.log(thing) Thing outputs : { errors: [ { code: 403, message: 'Forbidden' } ] }