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: Request/Get Roblox API?

Previous Thread :: Next Thread 
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
11 Aug 2016 04:13 PM
http://wiki.roblox.com/index.php?title=Web_APIs

http://api.roblox.com/docs

For example, I want to request the content from this page:
https://www.roblox.com/headshot-thumbnail/json?userId=1&width=180&height=180

That being:
{"Url":"https://t6.rbxcdn.com/e75e7cff47f7c2c531a48deeda70a5f1","Final":true}

I then want the second value inside this table.

MyRequestTable = REQUEST("https://www.roblox.com/headshot-thumbnail/json?userId=1&width=180&height=180")
MyImage.Image = MyRequestTable[2]


You can see what I'm doing here, but I don't actually know the code to make a request. None of the pages I linked to at the start have this information. They've talk about a lot of things good to know, but unfortunately seem to miss the key piece I need, that being the function to actually make the request.

https://www.roblox.com/headshot-thumbnail/json?userId=1&width=180&height=180
tl;dr - How do I request the page?
Report Abuse
0xDEADC0DE is not online. 0xDEADC0DE
Joined: 10 Apr 2016
Total Posts: 1039
11 Aug 2016 04:14 PM
game.HttpService:GetAsync(url)


Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
11 Aug 2016 04:18 PM
I seem to be getting:

"22:16:49.898 - http://www.roblox.com/bust-thumbnail/json?userId=1148735&height=100&width=100: Trust check failed, The operation completed successfully."

Apparently roblox.com isn't trusted?

I thought you couldn't make HTTP requests to roblox:
http://wiki.roblox.com/index.php?title=API:Class/HttpService

Is it impossible to get the page then?
Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
11 Aug 2016 04:19 PM
Oh wew, I had a colon at the end.

Never mind.

I was requesting it correctly the whole time but never actually tested the link.

Thanks for the help.
Report Abuse
0xDEADC0DE is not online. 0xDEADC0DE
Joined: 10 Apr 2016
Total Posts: 1039
11 Aug 2016 04:19 PM
Nope. You must use a proxy.


Report Abuse
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
11 Aug 2016 04:21 PM
-just realised I didn't have a colon at the end it was the error message that did

Ah, so about the proxy, I have to host my own server and make the requests through my server from roblox?

Wew.

What a mess.

Thanks for the help man.
Report Abuse
0xDEADC0DE is not online. 0xDEADC0DE
Joined: 10 Apr 2016
Total Posts: 1039
11 Aug 2016 04:22 PM
There are sites that already do this.

One of them is roblox-proxy.cf


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