I need help with getting Audio ID straight from roblox library, in roblox game server

with the recent partnership with Monstercat, I planned to make a pre-album that has all the monstercat audio, so players can enjoy good music, but I try HttpService and it returns cant parse JSON

3 Likes

Can we see the script please?.

1 Like

there is no script, I am asking how to do it, I tried HttpService, but it block access to Roblox, I tried proxy but it not working

1 Like

What proxy are you using and what’s not working?
If you’re familiar with proxy than check this out. Post

Edit: @danthemanroblox192
That rprxy proxy seems to be not working because when i tested it only returns empty table. Instead you can follow this tutorial and have your own proxy. Post
Below you can learn more about the Url in the GetAsync()
Library Catalog API

-- After you have done setting up the app paste this code inside Server Script code
local HttpProxy = require(game.ReplicatedStorage.HttpProxyService:Clone()) --Requires the module. Make sure the modulescript is inside the ReplicatedStorage
local name = "song name here"
result = game.HttpService:JSONEncode(HttpProxy:GetAsync("https://search.roblox.com/catalog/json?CatalogContext=2&Keyword="..name.."&Category=9&SortType=0&ResultsPerPage=10"))
decoded = game.HttpService:JSONDecode(result)
print(decoded[1].AssetId) -- first result song id 
print(decoded[2].AssetId) -- second result song id if it exists otherwise it will print nil
2 Likes

I am not familiar with proxy, but I used http://rprxy.xyz/

1 Like

In the place, do you want players to have access to a list of music (album), or something else?

If its using a roblox Audio ID you don’t need to use HTTP service unless if you want to play audio remotely from outside the game.

Yes, I want players to have access to a list of all music created by monstercat, I don’t want to create hassles of going to library.

Is the album from a certain user, or from Roblox?

monstercat, they partnership with roblox to create high quality song

1 Like

I am not familiar with the API you linked earlier to find songs. Usually when roblox partners with someone or a music company, they upload the songs under their own roblox profile. So using that API (correct me if I’m wrong) you would get thousands of songs by the roblox account. There might be some way to do this, but I think you need to manually get each song. Maybe try searching for key words if you decide to search manually

ik I can do it manually, do it manually is easy, but it not really efficient and I have to manage alots of assets ID, I just try to find the easier way, well I am kinda lazy

You can make a for-loop for each audio type that automatically organizes/sorts them

How do you want players to access the Audio?
When they access it, will it be in a GUI pop-up or something else?
how do you want to organize the audio? (by length, name, etc.)

If you are new to scripting I would be more than happy to help guide you through organizing the audios using a loop in a script

Oh, I already did that, I am asking how to get roblox library api when inside roblox game, that its, but I think I found an alternative solution already

Alright, well I hope the method you found works. But I can’t think of any other solutions at this moment. You could try getting the audio from the API via HTTP Service, but again it will likely give you the hundreds of thousands of songs the roblox account has (if the songs are on the roblox profile) If this does work, I THINK it will return as a table with IDs. Though im not familiar with HTTP service enough to know what you would get

1 Like

Thank you, but I found another solution around it, I doesn’t need this anymore