I've been trying to develop soundcloud api using python on 'Bottle'
framework in Eclipse 'IDE' (mac os). My goal for now is to upload a
track to my account using this api. I've struck at authentication. I'm
able to get 'code' in eclipse IDE. However after authorization, url
can't get redirected to redirect_uri. So far my code is
------------------------------------------------------------------
from bottle import route, run, redirect
import soundcloud
@route('/soundcloud/connected')
def soundcloudapp():
client = soundcloud.Client(
client_id='MY CLIENT ID',
client_secret='MY CLIENT SECRET',
redirect_uri="
http://localhost:3000/soundcloud/connected")
client.authorize_url='
https://soundcloud.com/connect?
redirect_uri=
http://localhost:3000/soundcloud/
connected&response_type=code&client_id=MY CLIENT ID'
return redirect (client.authorize_url)
run(host='localhost', port=3000, debug=True)
-------------------------------------------
after entering "
http://localhost:3000/soundcloud/connected/" in my
browser I'm able to authorize to soundcloud. After selecting 'connect'
It's not getting redirected to my localhost. Instead it's redirecting
back to same url which is
"
https://soundcloud.com/connect?redirect_uri=http://localhost:3000/
soundcloud/connected&response_type=code&client_id=MY CLIENT ID"
However I'm able to extract code in my eclipse ide.
I'm not an experienced programmer. I guess the problem is with my
wrong usage of bottle framework. Can you suggest me what exactly I
need to do to upload a track to my soundcloud account. Or can you
suggest me other web frameworks with proper commands? Also can you
specify how to get access tokens using my code?
Regards
Dilip Reddy
House Music Producer/DJ
http://www.dilipreddy.com/