JoshKopen
JoshKopen

Reputation: 960

How to get track URIs from the Spotify API

I am currently writing a program which utilizes the Spotify API

I have a program which is capable of playing a track if I have the track URI. My problem is that I am having trouble figuring out how to get the track URI by calling the Spotify API. I was trying to use the SPTRequest class as this was what was in a video which was linked from the Spotify API page, but this is a deprecated class and I am having a lot of trouble figuring out how to navigate these classes. What would I do to get a Spotify track URI if for example I was searching by song name?

Upvotes: 1

Views: 1403

Answers (1)

arirawr
arirawr

Reputation: 1275

You're looking for the Search endpoint!

It will return a track object, which contains the track uri.

Upvotes: 1

Related Questions