7 releases

✓ Uses Rust 2018 edition

new 0.3.0 Mar 27, 2020
0.2.1 Feb 19, 2020
0.2.0 Jan 1, 2020
0.1.4 Jan 3, 2020
0.1.1 Dec 31, 2019

#31 in HTTP client

Download history 2/week @ 2019-12-24 94/week @ 2019-12-31 20/week @ 2020-01-07 47/week @ 2020-01-14 2/week @ 2020-01-21 2/week @ 2020-01-28 6/week @ 2020-02-04 8/week @ 2020-02-11 55/week @ 2020-02-18 23/week @ 2020-02-25 10/week @ 2020-03-03 8/week @ 2020-03-10 22/week @ 2020-03-17 28/week @ 2020-03-24

104 downloads per month




Asynchronous Rust Spotify client.


Aspotify is a Rust wrapper for the Spotify API. It provides Rust structures around all of Spotify's Object Model and functions around all their endpoints.


All Spotify endpoints require authorization. There are two forms of authorization provided by this library; Client Credentials and Authorization Code. To use either, you first need a Spotify Developer account, which is free. Then you can use endpoints with your Client ID and Client Secret with Client Credentials, or perform actions on behalf of a user with oauth2 and Authorization Code.


In order to test, you first need to add http://non.existant/ in your Spotify whitelisted URLs. Get your Client ID and Client Secret and put them in a .env file in the crate root like this:

CLIENT_ID=some value
CLIENT_SECRET=some value

Then, run cargo run --example refresh_file. Follow the instructions shown. If everything went successfully, you should see a file called .refresh_token in your crate root. This file contains a refresh token that will be used to run all the tests. For more infomation about this process, see examples/refresh_file.rs.

aspotify currently uses a global Client internally. This means that it cannot work from multiple executors at once. This does not effect most binaries, but tests must be run with -- --test-threads=1.

These tests will make temporary changes to your account, however they will all be reverted. You will also need an unrestricted non-private Spotify client open to get all the tests to run successfully.


~192K SLoC