afxjzs
afxjzs

Reputation: 982

How to get access_token via Javascript SDK on SoundCloud?

I'm using the Javascript SDK to access the SoundCloud API and I can't figure out how to maintain the connection using the javascript API.. every time I refresh, it makes you re-connect again, which is crummy for UX.

How can get the access_token so that I can store, and then subsequently, how do I re-send that token to authorize so the user doesn't need to reconnect each time they visit the page.

There's a ton of docs about how to do it with PHP, etc...but nothing in Javascript SDK about access tokens.

I am pretty sure that the SC.isConnected() function was working, but now it just loads the connect button each time.

Everything is working correctly, I just don't want the user to have to reconnect each time.

Upvotes: 5

Views: 1021

Answers (1)

You can use SC.accessToken() to access it. We are planning to provide some sort of session persistence and a better backend integration in the next 2 months.

Upvotes: 3

Related Questions