YouTubeInMP3 API Problems With Sound

Hey guys so i am having a problem with this code right here i don’t know if i do something wrong (i am a noob)
i don’t have any LUA errors so far but the music is not playing i can’t hear it


http.Fetch( "http://www.youtubeinmp3.com/fetch/?format=JSON&video=http://www.youtube.com/watch?v=o9PCfPXWBFg",
  function( body )
    local json = util.JSONToTable(body);
    PrintTable(json)
    sound.PlayURL(json["link"], "mono", function() end )
    LocalPlayer():ChatPrint("Now Playing: " ..json["title"])
  end,
  function( error )
  	print ("Invaild")
end )

And the json table is working fine JSON OUTPUT:


length	=	449
link	=	http://www.youtubeinmp3.com/download/get/?i=wix89xcwZujbie%2FQXz1Z1g0BNzas%2FBh%2BQCc0iy%2BrdqbZEdA8BxOlOD818BwmhKcQKLi3ZHAQxXvg7D2TRGUxkA%3D%3D
title	=	Tropical Bleyage - Mala

So any ideas on how to make the sound work ?



sound.PlayURL(json["link"], "mono", function() end )


Should be like this instead it seems:



sound.PlayURL(json["link"], "mono", function(x)
  if IsValid(x) then
    x:Play()
  else
    print("Error")
  end
end)



http.Fetch( "http://www.youtubeinmp3.com/fetch/?format=JSON&video=http://www.youtube.com/watch?v=o9PCfPXWBFg",
	function( body )
    	local json = util.JSONToTable(body);
   			 PrintTable(json)
   			 sound.PlayURL(json["link"], "mono", function(URL)
  		if IsValid(URL) then
    		 URL:Play()
    		 LocalPlayer():ChatPrint("Now Playing: " ..json["title"])
  		else
    		 LocalPlayer():ChatPrint("Invaild URL")
  		end
 	end)
end)

I tried this and i get “Invaild URL”

this API looks a little better gonna try it out tomorrow

Not any luck so far…



local SongID = ""
local ExampleID = "o9PCfPXWBFg"
http.Fetch( "http://www.yt-mp3.com/fetch?v=" ..ExampleID,
function(body)
local json = util.JSONToTable(body);
PrintTable(json)
timer.Simple( 1, function() sound.PlayURL(json["url"], "mono", function(MusicURL)
if IsValid(MusicURL) then
MusicURL:Play()
LocalPlayer():ChatPrint("Now Playing: " ..json["title"])
else
LocalPlayer():ChatPrint("Invaild")
end
end)
end)
end)


[editline]19th September 2016[/editline]

Well i fixed it here is final code



local VideoID = "C2Q9YazF0U0"
http.Fetch( "http://www.yt-mp3.com/fetch?v=" ..VideoID,
function(basejson)
local json = util.JSONToTable(basejson)
PrintTable(json)
timer.Simple( 5, function()
sound.PlayURL("http://serve01.mp3skull.onl/get?id=" ..VideoID, "", function(AudioURL)
if IsValid(AudioURL) then
AudioURL:Play()
LocalPlayer():ChatPrint("Now Playing: " ..json["title"])
else
LocalPlayer():ChatPrint("Invaild")
end
end)
end)
end)