php-soundcloud icon indicating copy to clipboard operation
php-soundcloud copied to clipboard

SoundCloud\Client probably uses old SoundClound API which returns some incorrect data

Open JankesJanco opened this issue 7 years ago • 1 comments

When calling SoundCloud\Client::get() method, e.g.

$client = new SoundCloud\Client($appKey, $appSecret, $redirectUri);
$client->get('users/30994369/tracks');

request will be made to https://api.soundcloud.com/v1/users/30994369/tracks, which is currently undocumented API endpoint (probably it is older API). The endpoint returns some data which seems correct at first glance but e.g. playback_count of tracks does not correspond to reality (which can be checked on soundcloud web pages). The request should be made to https://api.soundcloud.com/users/30994369/tracks.

JankesJanco avatar Jun 12 '18 17:06 JankesJanco

one easy workaround is to specify full url when calling SoundCloud\Client::get() method, e.g.

$client->get('https://api.soundcloud.com/users/30994369/tracks');

JankesJanco avatar Jun 12 '18 17:06 JankesJanco