Reputation: 83
I have a PHP application that uses Soundcloud API to get songs with a specific license: https://developers.soundcloud.com/docs/api/reference#tracks
I make a request for every license type, but I always get a 400 Bad Request error only on the one with license=cc-by-nc, for example:
http://api.soundcloud.com/tracks/?client_id=APIKEY&limit=20&license=cc-by-nc&tags=folk
cc-by-nc is in the list of available license types on the docs, and the parameters are always the same for all licenses. Here is the code of the application that is calling the API: https://github.com/antodippo/ccmusicsearch/blob/master/src/CCMusicSearchBundle/Service/SoundcloudApiService.php
Upvotes: 0
Views: 244
Reputation: 1209
So I think that may be a broken filter and their docs may not be up to date. The error I get is below:
error_message: "invalid filter.license=cc-by-nc; valid values are: to_share, to_use_commercially, to_modify_commercially, cc-by, cc-by-nc-nd, cc-by-nc-nd-sa, cc-by-nc-sa, cc-by-nd, cc-by-sa"
I just tested the above and they seem to all work correctly.
Upvotes: 3