Skip to content

401 - Unauthorized on POST request to '/tracks' route #8

Description

@tryenc

I'm getting a 401 - Unauthorized on POST request to the '/tracks' route. I'm trying to upload a track to my Soundcloud profile. Any idea why this wouldn't be working? Thanks so much in advance!

        var SC = require('node-soundcloud');

        SC.init({
            id: client_id, 
            secret: client_secret, 
            uri: redirect_uri,
            accessToken: access_token
        });

        var mp3Path = path.join(__dirname + '../../../test2.mp3')

        SC.post('/tracks', {
            track: {
                'asset_data': fs.createReadStream(mp3Path),
                'title': '4.20-14.47'
            }
        }, function(err, data){
            console.log("data", data);
            res.end();
        })

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions