Questions tagged [libspotify]

The libspotify C API package allows third-party developers to write applications that utilize the Spotify music streaming service.

Libspotify
The libspotify C API package allows third-party developers to write applications that utilize the Spotify music streaming service. Hopefully, this will enable and inspire you to build some really cool stuff. We’re looking forward to seeing what you can come up with.

Documentation
The API documentation is available online. The libspotify distribution also contains the documentation, as well as a few code examples. There is also an FAQ available.

Application keys
Please login with your Spotify Premium account to apply for an application key.

Download
Libspotify is available for Windows, Mac OS X (x86 / x86_64), iOS, and Linux (x86 / x86_64 / ARM).

Download the file and unpack it with your favourite extractor. On the command line for most Linux distributions, you can use tar xzf libspotify-*.tar.gz to extract it. You will now have a directory called something starting with libspotify-. Inside, you should find a README worth at least skimming through.

User experience guidelines
The following guidelines have been carefully developed to provide our users with a familiar and friendly experience across all platforms, and to maintain the Spotify look & feel that we all know and love. Please ensure that your application follows them closely.

Branding
See the Terms of Use on how to use these logotypes.

Branding in graphical user interfaces

Terms of Use
We need to protect users, content providers, the Spotify trade marks and our software and service while at the same time enabling you to create applications. We therefore require you to comply with some basic rules. You should also note our trade mark guidelines.

Furthermore we want to let you know that the use of our APIs under these terms is for non-commercial use only: they are not intended to allow you to sell any software or devices based on these APIs. If you would like to make use of Spotify in a commercial way, then please contact our Partner team before you engage in any work.

Region-specific Terms of Use can be found here:

Third party licenses
Several fantastic pieces of free and open-source software have really helped get Spotify to where it is today. A few require that we include their license agreements within our product. Consider it done. As we enjoy giving credit where it's due, we included the entire list below. This means you can not only see which software we've been using, but the terms of the licenses too. A big thanks from all of us at Spotify to the smart people behind the fantastic programs listed. Rock on!

218 questions
12
votes
3 answers

Spotify API: INVALID_APP_ID

I am currently working on an android app which is implementing the Spotify API. I have all of the code connecting my app to spotify using the tutorial and have been working on my app for sometime now. When I play a song through my app after…
Rockyfish
  • 339
  • 3
  • 15
11
votes
4 answers

Getting Spotify play history through either the Web API or libspotify

Is there a way to get my Spotify play history using either their js or C APIs? I saw a couple of examples, but that was using their outdated API version.
kmdent
  • 1,577
  • 16
  • 32
8
votes
0 answers

State of libspotify in 2017

I know that libspotify will no longer get any support and is replaced by webapis. I do not have any problems with this because libspotify usability is just bad and there are a lot of unfixed bug as well as lots of missing features. However, there is…
Thalhammer
  • 285
  • 3
  • 7
5
votes
2 answers

How to Look Up Spotify IDs (Song / Track IDs) in Bulk?

I have a list of songs - is there a way (using the Spotify / Echo Nest API) to look up the Spotify ID for each track in bulk? If it helps, I am planning on running these IDs through the "Get Audio Features" part of their API. Thanks in advance!
Zach
  • 1,243
  • 5
  • 19
  • 28
4
votes
0 answers

libspotify crashes at logout. Possible leak of threads?

I've been messing around with libspotify for a while now but I get a segmentation fault every once in a while when I call the sp_session_logout() API. I did a test that does the following loop: Create a session Login Logout Release the session It…
4
votes
1 answer

Preventing misuse of libspotify key

The terms of use for libspotify state that the key should be stored in a secure manner. The only recommendation for storing the key that I've found is compiling your application and distributing the binary. I have a hard time seeing this as anything…
4
votes
3 answers

NDK prebuilt shared library file format not recognized

I've been trying to follow this sample on github to get a basic spotify implementation working, I've followed the setup steps, installed all the required libraries etc but keep getting the following error during the native build stage. **** Build of…
ScouseChris
  • 4,377
  • 32
  • 38
3
votes
1 answer

Spotify API get track info based on track name?

Is there a way to query the spotify API in order to get information about a track/artist/album/playlist based on its name. E.g. query for track=I need a hero&artistName=... and get a URI/ID and some information about the track. I couldn't find…
George
  • 3,521
  • 4
  • 30
  • 75
3
votes
0 answers

sp_session_create segfaults when called from Rust FFI

Since Spotify is unlikely to provide a successor to libspotify anytime soon, I'm trying to wrap it into a thin Rust library that I can use for other projects. I'm using Bindings generated from the header file by rust-bindgen. Since they are quite…
Moritz Gunz
  • 702
  • 6
  • 15
3
votes
2 answers

How can an Android application function as a remote controller to a desktop application? (Spotify)

I am in the planning stages of developing an Android application to control my Spotify player. Since I am running Debian on my system, the options that are available on the Play Store are quite limited (I can't find any functioning apps). Therefore,…
user3745117
  • 127
  • 2
  • 11
3
votes
2 answers

Playing ohLibSpotify pcm data stream in C# with NAudio

I'm trying to play raw pcm data delivered from ohLibSpotify c# library (https://github.com/openhome/ohLibSpotify). I get the data in the following callback: public void MusicDeliveryCallback(SpotifySession session, AudioFormat format, IntPtr frames,…
freakimkaefig
  • 409
  • 5
  • 19
3
votes
1 answer

libspotify resource not loaded yet

When I implement followed functions in callback function logged_in,I get an error "resource not loaded yet".How to…
3
votes
3 answers

libspotify causing Apple App store rejection

Looks like Apple has tightened app store submissions staring May 1. I have an app that uses Spotify and have been accepted into the App Store multiple times. On a recent update, the app was rejected for the following reasons... Non-public API…
Steve Yung
  • 68
  • 5
3
votes
2 answers

Can't login to spotify via libspotify on raspberry pi

I'm using libspotify 12.1.103.gd51f6226 Release Linux-armv6-bcm2708hardfp on my Raspberry Pi and I think that everything worked out alright with the instruction in the readme. I changed out appkey.c for my appkey as given by spotify but when I run…
SNyamathi
  • 658
  • 6
  • 10
2
votes
0 answers

Is there a good alternative to pyspotify as far as streaming Spotify audio in Python goes?

I've been trying to look for a way to create an audio stream or otherwise grab the audio file from a Spotify URL inside of Python - my search led me to pyspotify, but apparently it no longer works. I haven't been able to find anything so I figured…
sethg
  • 159
  • 1
  • 1
  • 10
1
2 3
14 15