- Request data with the help of python script:
import getpass
import json
import re
import requests
client_id = re.compile(',client_id:"(.*?)"').search(requests.get(re.compile('src="https://a-v2.sndcdn.com/assets/app-.*.js"').search(requests.get('https://soundcloud.com/').text).group()[5:-1]).text).group()[12:-1]
username = raw_input('Username: ')
password = getpass.getpass()
access_token = requests.post('https://sign-in.soundcloud.com/sign-in/password?client_id={}'.format(client_id), data=json.dumps({'client_id': client_id, 'scope': 'fast-connect non-expiring purchase signup upload', 'recaptcha_response': '', 'credentials': {'identifier': username, 'password': password}}), headers={'Content-type': 'application/json'}).json()['session']['access_token']
print 'Client ID: {}'.format(client_id)
print 'Access Token: {}'.format(access_token)
print requests.get('https://api-v2.soundcloud.com/me?client_id={}'.format(client_id), headers={'Authorization': 'OAuth {}'.format(access_token)}).json()
On Ubuntu/Mint you have to install pip and install requests module:
sudo apt-get install python-pip
pip install requests
And then run the script above:
chmod +x script.py
python script.py
- Put it in SoundnodeApp via Developer Console (CTRL + ? or CTRL + /)
- Open Soundnode
- Open developer tools, go to tab Resources, under local storage open file://
- Add the Access Token under the key scAccessToken
- Add the Client ID under the key scClientId
- Restart Soundnode
- Restart application. Repeat everything if login windows occurs.