Athough you can't 'create' one yourself; if you go into the Spotify application, right click a song, and then press 'Copy Spotify URI' it will appear like what you want if you paste it.
There is a C API here already. I can't remember sorry but I think you may have to submit an online contact form asking for the API, but I'm not 100% sure!
This post was by Taylor - I do not work for Spotify! If this solved your issue - Mark it as a solution!If you like my post - Please add Kudos! || Spotify Profile - Taylor | Feel free to PM me - Here ||
Your second example is a valid Spotify URL to the song "Precious Thing" on the album "Little Earthquakes" by Tori Amos. What happens when clicking on it depends on what a Spotify member has installed. For example I have opened a browser tab with the web player at the moment, so the (next) song gets played in it, but it takes a while until everything has been forwarded etc. If I wouldn't have the web player open, usually the desktop software is started instead, and the song will be played there which can also take a while.
Concerning the Spotify API, it's open for developers like the Last.fm API, and searching the database for URLs is possible, too, e.g. playlist converters like www.ivyishere.org use this function all the time.
Ivy is neat and does what i 'd like.. in a way. Anyway, thanks for that!. It's great that there is an API but just not a web API. I'd still like to know, how i'd calculate the hash "2PAol2oDdGSHys8hc0gtLX" for the song mentioned above. I've got a php-app running on my website, which shows the last.fm recent tracks and since last.fm doesn't offer streaming anymore, i'd like to present spotify links instead.
I don't think that you have calculate that hash, because it is part of the full valid "http://open.spotify.com/track/..." link anyhow. Probably you only have to choose the output format for a found track in the Spotify database when searching it. An internal Spotify link starts with "spotify:track:..." plus the same hash, so only the protocol changes.
By the way, the Last.fm for Spotify app also offers a playlist of the last 50 Last.fm recent tracks, so it is possible to use the Spotify API for that.
Can someone tell me why when i post the spotify http link on my facebook page it snips off the topic after I post, and replaces it with the http address not allowing someone to be unable to know what the topic of the posting is???
the facebook page is (www.facebook.com/ezudna), I have 3 playlists on there where the Topic got snipped off and replaced with the same url i copied to the page that spotify gives.....
Can someone tell me how i get the topic inserted so that it doesnt snip off the topic of my playlist?
It should look like this when copied and pasted correctly ::::::::::::::>.