generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: HttpService ROBLOX's WebAPIs

Previous Thread :: Next Thread 
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
25 Apr 2015 05:31 PM
ROBLOX has many WebAPIs but you aren't allowed to use them as it's ROBLOX's domain ._.
Help meh
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
25 Apr 2015 05:38 PM
"Trust check failed"

local HttpService = game:GetService("HttpService")

game.Players.PlayerAdded:connect(function(plr)
local url = "http://api.roblox.com/users/get-by-username?username="..plr.Name
local data = "random because lol"
local userId = HttpService:PostAsync(url, data)
print(userId)
end)

Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
25 Apr 2015 05:55 PM
Help please <3
Report Abuse
hdtv13 is not online. hdtv13
Joined: 18 Sep 2012
Total Posts: 1628
25 Apr 2015 06:02 PM
Use RProxy?

I have skin, potatoes have skin, therefore I'm a potato.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
25 Apr 2015 06:43 PM
Use this

http://api-roblox-proxy.herokuapp.com/users/get-by-username?username=AbstractMadness
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
25 Apr 2015 06:55 PM
Thanks, but

"HTTP 404 (Not Found)"

When runned in script, doing it manually in chrome works ._.
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
25 Apr 2015 07:01 PM
oh.. you can't post to a get link wtf.

you get information

example would be


local http = game:GetService("HttpService")

game.Players.PlayerAdded:connect(function(plr)
local url = http:JSONDecode(http:GetAsync("http://api-roblox-proxy.herokuapp.com/users/get-by-username?username="..plr.Name))
for i,v in next, url do
print(v)
end
end)
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
25 Apr 2015 07:26 PM
"HTTP 403 (Forbidden)"
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
26 Apr 2015 04:54 AM
burp
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
26 Apr 2015 07:04 AM
Help meh
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Apr 2015 01:35 PM
One
day
latur
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Apr 2015 01:40 PM
game.HttpService:GetAsync("http://www.".."roproxy.".."tk/rapi/Web API [Optional]/Arg 1/Arg 2")
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
27 Apr 2015 01:41 PM
roproxy.pw/rapi ?
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
27 Apr 2015 01:42 PM
oh wow.. that's sweet
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
27 Apr 2015 01:47 PM
@epic

example please?

rproxy.pw/rapi/clans/get-by-user?userId=1

isn't working.
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
27 Apr 2015 02:36 PM
api.roproxy(dot)tk/clans/get-by-user?userId=0
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Apr 2015 02:37 PM
^
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
27 Apr 2015 02:43 PM
doesnt work
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Apr 2015 02:45 PM
x = game.HttpService:GetAsync("http://api.roproxy(dot)tk/users/get-by-username?username=ROBLOX")
print(x)

Make sure (dot) is changed to "."
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Apr 2015 03:23 PM
I actually forgot to change (dot) the first time ._.
Thanks!
It finally printed the table ;3
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
27 Apr 2015 03:33 PM
Replying so I can save for future reference when I finally buy a server and do something cool with HttpService
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Apr 2015 03:37 PM
^ nice!

This piece of code prints "nil"

local Http = game:GetService("HttpService")

game.Players.PlayerAdded:connect(function(plr)
local UserTable = Http:GetAsync("http://api.roproxy(dot)tk/users/get-by-username?username="..plr.Name)
--print(UserTable)
print(UserTable["Id"])
end)

(dot) = "." lol
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
27 Apr 2015 03:43 PM
print(Http:JSONDecode(UserTable)['Id'])
Report Abuse
FlyScript is not online. FlyScript
Joined: 05 Aug 2010
Total Posts: 2884
27 Apr 2015 03:44 PM
Maybe that's because no-one with that username was found? Also, try printing the whole contents of the table just in case.

In addition, what's returned may not quite be the table. Print off the result just to check what you're getting.
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
27 Apr 2015 03:45 PM
It returned a table,

print(UserTable)

I tested it with that and you could see it.
So it's not a JSON format and doesn't need to be decoded ;l
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image