Would it be possible to use parts of the Spotify API in Unity?

And if so what would the process of achieving that be?

I realize this is quite a big ask but I’m trying to determine whether this is even possible. I’m not looking for a complete guide to this, just a point in the right direction as I’m currently clueless.

My intention is to allow a user to play short preview clips of song and allow users to add them to their favorites list, share etc.

There is some information out there about achieving this however there is nothing relating to doing it in Unity.

Thanks in advance for any help given!

Sure it’s possible with Unity to access their API. However Unity’s WWW class only supports GET and POST requests, so all endpoints requiring HEAD, PUT or DELETE won’t work with the WWW class. In those cases you would have to use .NET’s native HTTP classes. Most problems you might encounter will be related to OAuth and authentication in general.

It seems there isn’t an endpoint to get access to the whole track (seems logical otherwise everyone could simply rip every track). You can load the preview of a track, but it’s in the mp3 format which Unity can’t load at runtime (unless you build for mobile). You would need a .NET / Mono compatible mp3 decoder. On mobile Unity can read mp3 since it’s using the native mp3 decoder of the device.