- Home
- Integrations
- Spotify
Spotify integration without code: player, playlists and music search
The Spotify integration in nana800 is a block that controls the player, searches tracks, albums, artists and playlists, creates playlists and adds tracks to them. To connect it you need an access token from your own app in Spotify for Developers, and player control also needs a Spotify Premium account. Every action costs $0.002, and your balance is topped up to $3.50 for free every month.
Build it in the builder- Block run: $0.002
- Free every month: $3.50
- No card needed
What you can do
- Play, pause, skip tracks, change the volume and add a track to the queue (Spotify Premium needed)
- See what is playing now and get recently played tracks
- Search tracks, albums, artists and playlists, including filters like artist:Queen year:1975
- Create playlists, add tracks at a chosen position and remove tracks
- Get details of a track, album or artist, the albums of an artist, your playlists and their tracks
- Read your liked tracks and the artists you follow
- Accept a track as an open.spotify.com link, a URI or an ID, for example from a message to a Telegram bot
Blocks in the builder
Spotify action
Action · $0.002 per run
One operation of your choice: player, tracks, albums, artists, playlists or library. Works with an access token of your Spotify app, valid for 1 hour. Returns the object found or a list and the total number of results.
How to set it up
- 1
Create a Spotify app
Open Spotify for Developers and click Create app. Enter any Redirect URI, for example http://127.0.0.1:8888/callback. In User Management add the email of your Spotify account: in development mode only the people added there can use the app, up to 5 of them.
- 2
Get an access token
Get a token through the Authorization Code flow with the Client ID and Client Secret from the app settings. Request the scopes for the player, playlists and library: the full list is in the block instructions in the builder. The token is valid for 1 hour.
- 3
Add the Spotify block
Create a scheme in the builder and add the Spotify block. Paste the token into the access token field and pick an operation, for example add_to_playlist. Set the playlist and the track as an open.spotify.com link, a URI or just an ID. Leave the position empty to add the track at the end.
- 4
Turn the scheme on and test it with the button
Add the button trigger, turn the scheme on and press the button. Check the playlist in Spotify or the block result: on failure, error_message explains what went wrong, for example an expired token. The button itself is free. You pay only for the Spotify block run.
- 5
Set up token refresh
If the scheme has to work longer than an hour, put a request block before the Spotify block that gets a new token from Spotify with your refresh token, which Spotify issues together with the first token. Put the new token from the answer of that block into the access token field.
- 6
Add the working trigger
Add the trigger you need, for example Telegram message from user to bot, so guests can send song links to your bot for a shared playlist, and keep the scheme on. While it is on, it costs $0.0042 per hour.
Frequently asked questions
Build your first scheme for free
Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.
Build it in the builder