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

Couldn't upload that sound.

Open rohitkhatri opened this issue 9 years ago • 2 comments
trafficstars

When I try to upload audio file to soundcloud, It throws error.

Here is my code:

$SC = new Soundcloud/Service('id','secret','redirect_uri');

$track = array(
    'track[title]' => 'My awesome track',
    'track[tags]' => 'testing',
    'track[asset_data]' => '@/home/vagrant/Code/livecenter/public/test.mp3'
);

try {
    $response = $SC->post('tracks', $track);
    return $response;
} catch(\Soundcloud\Exception\InvalidHttpResponseCodeException $e) {
    return $e->getHttpBody();
}

And this is the error, I'm receiving

{"errors":[{"error_message":"Couldn't upload that sound."},{"error_message":"Couldn’t upload that file, sure they’re valid soundfiles?"}]}

rohitkhatri avatar Feb 13 '16 10:02 rohitkhatri

Is anybody have problem with PHP api? Off, but maybe related with this api.

I used next line to return user followers and works perfect: $follow = json_decode($soundcloud->get('users/{{used_id}}/followers'), true);

But before few days, I noticed that isn't work, and return 404

The requested URL responded with HTTP code 404.

CheeVT avatar Feb 18 '16 15:02 CheeVT

@CheeVT Yes I'm getting same error while getting follower. Did you figure out what's the issue?

faizanahmad avatar Feb 19 '16 16:02 faizanahmad