Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

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