SoundCloud.getLoginUrl()

Get the URL on SoundCloud that a user should visit to authorize the specified SoundCloud app (i.e. your app).

This is the URL where you typically redirect a user in order for them to grant access to your SoundCloud app.

Usage

Hover over inputs/exits for more info.

var SoundCloud = require('machinepack-soundcloud');


// Get the URL on SoundCloud that a user should visit to authorize the specified SoundCloud app (i.e. your app).

SoundCloud.getLoginUrl({

clientId: 'abc123jdhs3h4js',

callbackUrl: 'http://localhost:1337/auth/soundcloud/callback',

responseType: [ 'code' ],

scope: 'non-expiring',

display: 'popup',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

clientId required

The unique identifier for your SoundCloud app. It's listed on the application settings page.

'abc123jdhs3h4js'
callbackUrl required

The URL in your app where users will be sent after authorization.

'http://localhost:1337/auth/soundcloud/callback'
responseType

(code, token_and_code)

[ 'code' ]
scope

Must be `*` or `non-expiring`.

'non-expiring'
display

Can specify a value of `popup` for mobile optimized screen

'popup'

Exits

error

An unexpected error occurred.

success

OK.

'https://soundcloud.com/connect?client_id=215798311808508&redirect_uri=http://localhost:1337/auth/soundcloud/callback&response_type=code&scope=non-expiring'