c# - Trello API OAuth 找不到我的应用

标签 c# api oauth console-application trello

我正在使用 Trello 的 Developer API 的 OAuth 实现来将内容发布到列表中。

我已成功发出请求并从 https://trello.com/1/OAuthGetRequestToken 取回了我的 oauth_tokenoauth_token_secret

但是当我调用 https://trello.com/1/OAuthAuthorizeToken ,传递我刚刚收到的 oauth_token,我收到“找不到应用程序”的响应。

有人能帮忙吗?


编辑:这是我从 https://trello.com/1/OAuthGetRequestToken 返回的内容

oauth_token=8d0e43fd0cc67726567d49ae5e818852&oauth_token_secret=[secret]

这是我发送的授权 header (在 C# 中转义)

"OAuth oauth_version=\"1.0\", oauth_signature_method=\"HMAC-SHA1\", oauth_nonce=\"8335006\", oauth_timestamp=\"1414663625\", oauth_consumer_key=\"9612eaca23c7bdd3eca60dc8c2a8159c\", oauth_signature=\"M6sLyyfHGYXOtQnLJexDx96kbFo=\", oauth_token=\"8d0e43fd0cc67726567d49ae5e818852\""

我是不是做错了什么,或者这是 Trello 端的错误?


编辑:我正在使用 RestSharp 调用 Trello API,如下所示:

var client = new RestSharp.RestClient("https://trello.com/");
var request = new RestSharp.RestRequest("1/OAuthAuthorizeToken", Method.GET);

编辑:这是完整的 RestSharp 代码:

var client = new RestSharp.RestClient("https://trello.com/");
var request = new RestSharp.RestRequest("1/OAuthAuthorizeToken", Method.GET);
Uri uri = new Uri(string.Format("{0}/{1}", client.BaseUrl, request.Resource));

string authHeader = GenerateAuthorizationHeader(uri);

//This is the output of GenerateAuthorizationHeader() 
//string authHeader = "OAuth oauth_version=\"1.0\", oauth_signature_method=\"HMAC-SHA1\", oauth_nonce=\"8335006\", oauth_timestamp=\"1414663625\", oauth_consumer_key=\"9612eaca23c7bdd3eca60dc8c2a8159c\", oauth_signature=\"M6sLyyfHGYXOtQnLJexDx96kbFo=\", oauth_token=\"8d0e43fd0cc67726567d49ae5e818852\"";

request.AddHeader("Authorization", authHeader);

GenerateAuthorizationHeader 方法使用 OAuth.OAuthBase 为 OAuth 请求生成时间戳和签名。

最佳答案

看起来可能是 trello 的问题... 这个用户,听错了 key 。 你 100% 确定 key 是正确的吗? Getting "App not found" from Trello Authentication

关于c# - Trello API OAuth 找不到我的应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26594474/

相关文章:

c# - 自动刷新 Blazor 中的组件

c# - 如何区分USB和软盘设备?

ruby-on-rails - 一种通过 rails 与 linkedin 的消息传递 api 对话的方法

python - Linkedin API如何获取公司状态更新? Python

ios - 新的Apple ID登录无效授予问题

c# - 为什么 ToLookup 和 GroupBy 不同?

c# - 编程为接口(interface)或其他抽象类型

linux - 在 Nagios 中获取主机可用性到外部网页

java - 用户刷新页面时重用 OAuth 请求 token - GAE 上的 Twitter4j

oauth - Desire2Learn 使用 LTI 学习工具链接的 oAuth 签名无效