user1479375
user1479375

Reputation: 1

Soundcloud HTML5 widget can't be used with Xenforo

When trying to get the Soundcloud HTML5 widget to embed in a Xenforo forum I notice that it requires the Track ID which is not availiable in the URL of the page. Is there a way to get the track id without having to scrape the source code or force the user to get it from the whole embed code?

Upvotes: 0

Views: 272

Answers (1)

nickf
nickf

Reputation: 546253

You can use the /resolve endpoint: http://developers.soundcloud.com/docs/api/reference#resolve

$ curl -v 'http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/matas/hobnotropic&client_id=YOUR_CLIENT_ID'

< HTTP/1.1 302 Moved Temporarily
< Location: http://api.soundcloud.com/tracks/49931.json

See for yourself: http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/matas/hobnotropic

Upvotes: 1

Related Questions