2
我正在使用「身份驗證沒有SoundCloud Connect屏幕」身份驗證方法(請參閱http://developers.soundcloud.com/docs#authentication)。這是您提供整個證書的方法 - client_id,client_secret,用戶名和密碼。我也在使用Ruby SDK。Soundcloud API 401未經授權使用/解決方案
# create client object with app and user credentials
client = Soundcloud.new(:client_id => 'YOUR_CLIENT_ID',
:client_secret => 'YOUR_CLIENT_SECRET',
:username => 'YOUR_USERNAME',
:password => 'YOUR_PASSWORD')
我正在嘗試使用客戶端來解析用戶。
puts client.get('/resolve', :url => 'https://soundcloud.com/random-username').inspect
但是,我不斷收到客戶端返回的401 Unauthorized
。
我可以確認我是身份驗證,因爲以下執行正常。
puts client.get('/me').username
有沒有人有任何線索我做錯了什麼?