|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 25 Apr 2015 06:43 PM |
Use this
http://api-roblox-proxy.herokuapp.com/users/get-by-username?username=AbstractMadness |
|
|
| Report Abuse |
|
|
|
| 25 Apr 2015 06:55 PM |
Thanks, but
"HTTP 404 (Not Found)"
When runned in script, doing it manually in chrome works ._. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
|
| 27 Apr 2015 01:40 PM |
| game.HttpService:GetAsync("http://www.".."roproxy.".."tk/rapi/Web API [Optional]/Arg 1/Arg 2") |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 27 Apr 2015 01:47 PM |
@epic
example please?
rproxy.pw/rapi/clans/get-by-user?userId=1
isn't working. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 27 Apr 2015 03:43 PM |
| print(Http:JSONDecode(UserTable)['Id']) |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|