【发布时间】:2012-06-20 09:18:52
【问题描述】:
我是 SoundCloud 的新手,一直在关注 Authenticating without SoundCloud screen 中的开发人员文档。
但是,当我的应用程序发送请求时,我收到 401 Unauthorized 错误。在文档中,它指定检查 client_id 或 access_token 是否丢失。
我无法弄清楚这里有什么问题。我检查了以下内容:
- 注册申请 - 检查
- 传递 client_id 和 client_secret - 检查
这是我调用声音云服务器的代码:
response = (HttpWebResponse)request.GetResponse();
这里是请求对象的值:
AuthenticationLevel MutualAuthRequested
CachePolicy {Level:BypassCache}
ConnectionGroupName null
内容长度 -1
ContentType “应用程序/json”
凭据 null
标头 {Content-Type: application/json}
ImpersonationLevel 委托
方法 “POST”
预认证 false
代理 {System.Net.WebRequest.WebProxyWrapper}
RequestUri {https://api.soundcloud.com/oauth2/token?client_id=############&client_secret=###########&grant_type=password&username=### ####&密码=########}
超时 100000
UseDefaultCredentials false
通话后我收到 401 Unauthorized 错误,我什至尝试关注 Geek Life's 博客但收到相同的错误。 我在这里遗漏了什么吗?
【问题讨论】:
-
亲爱的你能剪下你的代码吗?我正在尝试使用 c# 连接到 soundcloud,但不知道该怎么做
标签: c#-4.0 oauth-2.0 soundcloud