Token validation failed sending webapi request

I"m using Python to bulk hide games and for some reason I’m getting a 403 with the json {'code': 0, 'message': 'Token Validation Failed'}. I’m not sure what the cause is and all I could find was an old unanswered topic on the issue.

My code is fine and I am sending the full cookie header my browser was.
image


Thank you for any support.

This error means the request needs a x-csrf-token token header in order to be processed. When you receive it, the server should send you back a valid csrf token as a response header of that failed request. So just make a single failed request, fetch the token from the response headers, add it to your new request headers and it will be successful.

This doesn’t mean the Roblox cookie is invalid, the error for that is something along the lines of Authorization Failed

Thank you, this worked. Weirdly it always seems to be the same but I’ll keep change detection incase it does happen to change.

image

It remains the same for a small amount of time, so just change it every time you get that specific error.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.