Skip to content
libspotify .NET bindings
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


ohLibSpotify is OpenHome's managed wrapper around the libspotify library. To use ohLibSpotify, an application needs only the managed ohLibSpotify.dll, and the native|.dll|.dylib. (It is not dependent on any other OpenHome library.)

ohLibSpotify attempts to expose all libspotify entities - such as sessions, playlists and tracks - as regular C# classes, and where possible libspotify functions become instance methods on the appropriate class. It does all the necessary conversions to and from UTF8, so that users see only managed strings.

Quick start


  • Git
  • Python 2.6/2.7 (technically you don't need Python, but it's much easier.)
  • Visual Studio 2010 or Mono 3.0

Sync up these two repositories:

git clone
git clone

Build (note that building this way will fetch dependencies from the Internet):

cd ohLibSpotify
go build

You need a Spotify API key to use libspotify in an app. You can get one here:

Copy it into your ohLibSpotify directory.

Now you can run the demo console app:


For more details about building ohLibSpotify, see doc/ For more details about using ohLibSpotify, see doc/

Other platforms

Currently, only the Windows-x86 platform has been tested. Our focus will be on Windows, Linux and Mac, but patches for iOS and Android are welcome and we do try to avoid doing anything that would make porting difficult. (In particular, we only use static methods when passing callbacks to P/Invoke methods, so it should not be too hard to run on Mono with the JIT disabled, as is necessary on iOS.)

Note that the ohLibSpotify.dll assembly is platform-specific. You need to build a different version for each platform. The managed API should remain the same between platforms.


Discuss ohLibSpotify here:

Get the source code and submit bug reports on github:

You can also ask questions on Stack Overflow tagged with 'libspotify' or 'ohlibspotify'. Stack Overflow is a good place for general questions about libspotify that are not specific to ohLibSpotify, as you will find a wider audience.

Directory contents

go / go.bat

Provides the "go" commands that can be used to fetch dependencies, run builds and maintain files. Before you can invoke these commands, you must fetch the ohDevTools repository and place it side-by-side with this one. Run "go" on its own for a list of commands.


Contains configuration information used by automated builds and dependency fetching tools.


Contains the source code of the project.


This directory will be created by the "go fetch" command. It should contain external dependencies required during the build process, such as non-framework third-party assemblies.


This directory will be created during a build. It contains whatever assemblies, libraries and packages are created by the build.

You can’t perform that action at this time.