So i was looking into making a program using python that shows me the number of trades I have inbound, and each one’s respective total value, so I looked at the trades api from roblox itself (https://trades.roblox.com/docs#/) and found /v1/trades/{tradeStatusType}/count to be solutions for my project’s first need, the problem is when I was testing with it, it gave me error 401. I searched about it on google (What Is a 401 Unauthorized Error and How Do You Fix It?) and read that it happens when: " The 401 Unauthorized error is an HTTP status that means the page you were trying to access cannot be loaded until you first log in with a valid user ID and password.".
With that said I was wondering if there is a way to verify myself as my account and chekc the number of my trades inbound
You’ll need to send the .ROBLOSECURITY cookie with the request.
If you do this from your web browser whilst logged in at roblox.com, you’ll see it works - that’s because you have your .ROBLOSECURITY cookie on your browser for .roblox.com addresses.
Hey @kylerzong, I saw the authentication api that you sent me and tried to test it, the problem is that it gave me this error: ({“errors”:[{“code”:0,“message”:“Token Validation Failed”}]}).
This was what I sent in the post: data = {
“ctype” : “Username”,
“cvalue” : “FallenHaunted”,
“password” : not showing to dev forum lol,
}
I didnt put in “captchaToken” or “captchaProvider” because the api said it was optional and didnt put in a description for it except saying it is a string . I would really apreciate if you knew what they meant.
This is because you didn’t provide a X-CSRF-Token header. It should give back a token in the response headers, so you can just pull it from there and retry the request with the token. You will not get past the robot test though because to do the captcha you need to pass it. It is a robot test for a reason. What most people do (I’m not sure if there is another way) is to just login manually and grab the cookie you get from that and use it for requests your bot request.