Announcements
From 28th September 2026, Community private messages will no longer be available. If you have any private messages you'd like to keep, please save or copy them using these steps before this date. Thank you.

Help Wizard

Step 1

NEXT STEP

How do I get sound from the API?

How do I get sound from the API?

Plan

Free

Country

Ukraine

Device

PC

Operating System

Windows 11

 

My Question or Issue

How do I get sound from the API? I can't find the path to the sound. I am using Node.js

 

spotifyApi.getTrack("7dK87kjEyN7nMoxF57AT9R").then(function(data) {
console.log(data.body);
}, function(err) {
console.error(err);
});

 

Reply
1 Reply

Hey @AlexInCube,

Good question! You can use the preview_url to hear a 30 second snippet from a song (as preview). To stream full tracks, you can use the Web Playback SDK (or remote control the iOS/Android app with their respective SDKs).

Check out this for more information: https://developer.spotify.com/documentation/web-playback-sdk/quick-start/

Give me a shout if you have any questions!

Happy coding,
Hubo
HuboSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 5 years ago  in Social & Random