Help with getting a users's trade privacy

HI DevForum, so I was trying to check a player’s privacy trade options, and checked the Trades Api (https://trades.roblox.com/docs#/) I quickly found in there a way to, using /v1/users/userId/can-trade-with, and I tested it out with rprxy.xyz as my proxy (link: https://trades.rprxy.xyz/v1/users/1030757071/can-trade-with), the problem is that it wasnt sending me any data, I aksed a friend and he told me that rprxy.xyz doens’t let me acess it, is that true, or am I just formatting the url wrongly. If its the proxy not letting me view that, are there any proxies who let me do that?

1 Like

https://trades.roblox.com/v1/users/10307570/can-trade-with

I just tested out this endpoint, and it works perfectly fine. I am pretty sure it’s a problem with that proxy.

I would recommend using Google Apps Script as a proxy, as demonstrated by @TheNexusAvenger in this tutorial. It is a completely free option, and is extremely simple to use and set up. I have personally used it quite a bit, and it works like a charm, besides that fact that is has some request limits.

Hope you find a solution that works for you!

1 Like

I’ll try that out, thanks a lot @ExcessEnergy :slight_smile:

1 Like

Hi again @ExcessEnergy, I tried out the tutorial and found it to be really helpful, the problem is I still wasnt able to get any data from the request, with the reason being “Unable to fetch”. The strange thing about this is that their examples worked, but when I tried using (https://trades.roblox.com/v1/users/261/can-trade-with) instead of their example (http://api.roblox.com/Users/261), it gave me this error. What am I doing wrong?

Screenshots:

Example:

image

My try:

image

I already explained this, and recommended that he create a proxy using Google Apps Script. He already has a proxy, but is still getting that warning.
image
HttpProxy:GetAsync() is a function that communicates with the proxy, and returns the content of whatever url you provide as the parameter.

Hold on. Let me give it a try, and see if I get the same result.

It seems that Google Cloud is having problems right now. This could be the issue.

1 Like

OK, thanks for the help anyway :slight_smile:, and for showing me this tutorial

@HauntedMansionStudio, I take back what I said about Google being the cause of the problem. I did some experimenting, I it seems that https://trades.roblox.com/v1/users/261/can-trade-with requires authentication of the user to work. This is why it will work in the browser, where you are authenticated, but not from a bot that is not authenticated as any user.

You will see that if you log out of the roblox website, going to the link will return

.

This is because that endpoint, detriments if your account specifically has permissions to trade with the said user. It can’t be run from something anonymous.
image
In order to use that URL, you would somehow have to be authenticated as a certain user, probably using a .ROBLOSECURITY cookie.

I think I’ll look into roblox+ code to see what they do when it comes to trading stuff

1 Like

I have personally used libraries like robloxapi as a base for authenticating in python, but I don’t have much experience doing it in Google Apps Script. I could see it being a bit complicated to do within the limited features of Google Apps Script. However, looking at how Roblox+ does it is a good idea.

1 Like