Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Get properly filtered Tracks #347

Open
AllFatherGray opened this issue Dec 5, 2024 · 7 comments
Open

Cannot Get properly filtered Tracks #347

AllFatherGray opened this issue Dec 5, 2024 · 7 comments
Labels
question Further information is requested

Comments

@AllFatherGray
Copy link

Title: Cannot retrieve all tracks for a user

Issue found of: December 2th, 2024

Endpoint(s):

  • GET /users/{id}/tracks

Scope(s):

  • None (application is not using authentication i.e., implicit flow)

Steps to reproduce:

curl --request GET \
  --url 'https://api.soundcloud.com/tracks?limit=1&linked_partitioning=true&client_id=DONT_SHARE_CLIENT_ID'

Expected behaviour:

A list of tracks as described at https://developers.soundcloud.com/docs/api/reference#users.

Actual behaviour:

Tracks with completely different genres and always more Tracks than the limit.

@AllFatherGray
Copy link
Author

The search for BPM seems to fail with BPM values of null

@youssefhassan
Copy link

Hey @AllFatherGray, thanks for the report.
The URL in the CURL is invalid and we don't support anonymous or client credentials calls i.e adding client_id into the URL. There has to be an authorization token for the user. The expected behaviour for the above request should be something like
A request must contain the Authorization header
Maybe you're looking into /search/tracks endpoints, Please elaborate what is your use case

@youssefhassan youssefhassan added the question Further information is requested label Dec 11, 2024
@AllFatherGray
Copy link
Author

@youssefhassan
Yes, I am using the auth token and I get tracks but they are just random tracks and don't always follow the genre tag I add.
There should be a genre list similar to the old way I've seen on StackOverflow so users know what is available.
Essentially, what endpoint / CURL/ URL should I use to get, for example, the top 10 Soul genre songs?
Or the top 10 songs in general?
People are mentioning using api2 and I see it in some repos but are these values still in use?
Thanks in advance.
soundcloud:genres:all-music
soundcloud:genres:all-audio
soundcloud:genres:alternativerock
soundcloud:genres:ambient
soundcloud:genres:classical
soundcloud:genres:country
soundcloud:genres:danceedm
soundcloud:genres:dancehall
soundcloud:genres:deephouse
soundcloud:genres:disco
soundcloud:genres:drumbass
soundcloud:genres:dubstep
soundcloud:genres:electronic
soundcloud:genres:folksingersongwriter
soundcloud:genres:hiphoprap
soundcloud:genres:house
soundcloud:genres:indie
soundcloud:genres:jazzblues
soundcloud:genres:latin
soundcloud:genres:metal
soundcloud:genres:piano
soundcloud:genres:pop
soundcloud:genres:rbsoul
soundcloud:genres:reggae
soundcloud:genres:reggaeton
soundcloud:genres:rock
soundcloud:genres:soundtrack
soundcloud:genres:techno
soundcloud:genres:trance
soundcloud:genres:trap
soundcloud:genres:triphop
soundcloud:genres:world
soundcloud:genres:audiobooks
soundcloud:genres:business
soundcloud:genres:comedy
soundcloud:genres:entertainment
soundcloud:genres:learning
soundcloud:genres:newspolitics
soundcloud:genres:religionspirituality
soundcloud:genres:science
soundcloud:genres:sports
soundcloud:genres:storytelling
soundcloud:genres:technology

@youssefhassan
Copy link

youssefhassan commented Dec 11, 2024

@AllFatherGray we don't support top tracks from a specific genre on public APIs
You can use https://developers.soundcloud.com/docs/api/explorer/open-api#/search/get_tracks but as it's a search endpoint a query string has to be input.
Also there's a bug on the api explorer, the endpoint should be /search/tracks not /tracks
What is the application are you using for that? and what are you trying to achieve?

@AllFatherGray
Copy link
Author

@youssefhassan
When using the Search endpoint the track ID: 1927786280
Produces an access policy of "playable".
But for the 'tracks/id' endpoint it says 'blocked' and cannot be streamed.

@youssefhassan
Copy link

Track access depends on many factors, user location, subscription, the application requesting. For playing, the more accurate access is the tracks/id one. Are both requests made with the same user token or client credentials? Happy to have a look into it

@AllFatherGray
Copy link
Author

@youssefhassan Thank you so much for your response. Yes the id and token are the same. I am using the API sandbox on the dev site.
Also can I get a list of acceptable genres?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants