Trello API OAuth cannot find my app

I am using Trello Developer API to implement OAuth to publish content to a list.

I successfully made a request and received oauth_token

and oauth_token_secret

back https://trello.com/1/OAuthGetRequestToken

But when I call https://trello.com/1/OAuthAuthorizeToken passing oauth_token

which I just received, I get the response "App not found.

Can anyone please help?


EDIT: Here's where I come back from https://trello.com/1/OAuthGetRequestToken

oauth_token=8d0e43fd0cc67726567d49ae5e818852&oauth_token_secret=[secret]

      

And here is the authorization header that I am sending (escaped in 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\""

      

Am I doing something wrong or is this a bug at the end of Trello?


EDIT: I am using RestSharp to call the Trello API like below:

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

      


EDIT: Here's the complete RestSharp code:

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);

      

The GenerateAuthorizationHeader method uses OAuth.OAuthBase

to generate TimeStamp and Signature for OAuth request.

+3


source to share


2 answers


Looks like it might be a trello issue ... this user had the wrong key from the sounds of things. you are 100% sure that the key is correct. Getting "App Not Found" from Trello Authentication



0


source


I had the same problem, the point is that OAuth is version 1.0 When you get the secret token and token from the first call, you have to force your user to visit https://trello.com/1/OAuthAuthorizeToken , not you.

In your case, you need to redirect the user to https://trello.com/1/OAuthAuthorizeToken?oauth_token=8d0e43fd0cc67726567d49ae5e818852&scope=read,write,account



He will receive a page where he can authorize access. Then you will receive a confirmation code on the page after authorization to continue the process (GetAccessToken).

You can try this as a test, in a real application you need to specify the callback url and application name in the OAuthAuthorizeToken call.

0


source







All Articles