Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would you use roblox APIs?

I've kind of looked at them, which confused me and how you can use them. Please explain the usage of them if you could. Roblx APIs

5 comments

1

If you're planning to use these in-game, you can't. You cannot use Roblox API's in-game through HttpService without a proxy. In fact, you can't use HttpService on any Roblox domain in-game. http://wiki.roblox.com/index.php?title=API:Class/HttpService -> Restrictions

0

... That being said., there are third-party APIs that you would probably find useful. This: http://roblox.plus:2052/inventory?username=XAXA would return a list of my items along with their RAP, and my total RAP. Hopefully this page would help: http://roblox.plus:2052/api . I cannot find a well-formatted documentation for this API.

0

roblox.plus:2052/api isn't working :L

0

Yes it is. It's supposed to display a simple documentation. I wouldn't mind helping you parse it.

0

If you can pls.

1 answer

I am glad you asked this! First off, I recommend you use this instead, as it is on the site, and probably more reputable. https://developer.roblox.com/articles/Web-APIs

As for how to use them, you can't use them inside a Roblox game. This is because their HTTPS service will not allow us to use anything that links to the site in a game server. However, many developers have worked around this. It's a simple work around, if you're willing to learn another programming language. I personally prefer JavaScript to solve it. What you end up doing is making a JavaScript webserver. From there, you send http requests to this webserver, which will send requests to those api links and return the responses to you on a roblox server. It's not the most efficient, but it's what we've got. If you choose to specifically learn NodeJs, which is very useful for this, you can install some modules. I can use XMLHTTPREQUEST, which is what is built into most browsers now. Alternatively, you can use another module called http. That's simple to use, and doesn't require you to make an async function to use it.

An example on how I use it on my webserver is:

https.get("https://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid="  + JSON.parse(RoVerResponse.toString()).Id  +  "&groupid=72321", (res) => { res.on('data', (RobloxRankResponse) => {

Keep in mind, you'll have to learn another language, or figure out how to make a webserver in lua and host it.

This discussion is preserved as it was. New answers, comments, and votes are closed.