Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Trello OAuth - 500 Server Error?

Victor Purolnik September 2, 2018

I am trying to build an application using OAuth v1 with Trello as described here.

On the `OAuthGetRequestToken` request I am getting a `500 Server Error` with no further response back from Trello.

I am using a PHP library, however I can reproduce this just by running the following HTTP request in postman:

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

with the following `Authorization` header (key, nonce and signature anonymized):

OAuth oauth_consumer_key="xxx", oauth_nonce="xxx", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1535936680", oauth_version="1.0", oauth_callback="http%3A%2F%2Ftrello.test%2Fauth%2Ftrello%2Fcallback", oauth_signature="xxx"

Can anyone give me hints on how to debug this? Is my request malformed? Even that should get me a proper error message and not cause Trello to smack me with a 500 in the face ;)

Thank you! :)

1 answer

1 accepted

0 votes
Answer accepted
bentley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2018

Hey Victor,

Just to confirm, you're using the OAuth secret listed at the bottom of trello.com/app-key, correct? 

We have a working example of an OAuth flow here: https://glitch.com/edit/#!/trello-oauth. Though it is written in Node and requires the oauth npm package.

Victor Purolnik September 3, 2018

Hey Bentley,

while I didn't find a solution, I found a workaround.

I created a blank, new Trello account, and everything worked with the key+secret given there.

I am not sure what is wrong with my main account's credentials. In any case, I think the Trello API shouldn't return a 500 Internal Server Error.

You can easily reproduce it sending the POST request above with my API key (can DM or email it to you) and any nonce and signature.

Something must be going wrong somewhere...

All the best,

Victor

Syauqi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2018

Hi Victor, 

I've submitted a request on the Trello Support Channel on your behalf and you can provide your personal information there to further investigate on the issue. 

Cheers,

Syauqi

Victor Purolnik September 3, 2018

Thanks Syauqi! :)

Syauqi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2018

No worries Victor, glad we could help! 

Tuan Nguyen September 5, 2018

Hi Bentley and Victor,

I don't mean to post-snipe, but I asked a very related question last Friday about Trello OAuth that you two might have information about:

https://community.atlassian.com/t5/Trello-questions/Trello-OAuthV1-invalid-token-in-Glitch-Example/qaq-p/880814

The gist of it is that I couldn't get OAuth working in my application, and I also referenced the glitch example explaining that I couldn't get that working either.

Victor: it sounds like you did get Trello OAuth working so perhaps you might know a gotcha that I'm missing?

Bentley: it sounds like you're able to get the glitch example working, so perhaps you might have insight into what I'm doing wrong with respect to the glitch example (described in my question)?

Thanks,

Tuan

bentley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2018

Can you give more info/context on what wasn't working? Did you see any error messages?

Tuan Nguyen September 6, 2018

Hi Bentley,

 

Absolutely I can provide more details--in fact, I've already thoroughly described what wasn't working in the Trello question that I linked to above. Here is the link to the question that I posted again:

https://community.atlassian.com/t5/Trello-questions/Trello-OAuthV1-invalid-token-in-Glitch-Example/qaq-p/880814

You can also find it by searching for the title "Trello OAuthV1 'invalid token' in Glitch Example" and I'll post a comment on there tagging you so that it pops up on your radar.

Finally, in case you still can't get to my post for whatever reason, I'll include a summary of my problem here (duplicated on my post):

 

With my TRELLO_KEY and TRELLO_OAUTH_SECRET provided to my remixed version of the Node.js project, I viewed it Live and attempted to go through the OAuth workflow.

The first step of hitting `https://trello.com/1/OAuthAuthorizeToken` seems to have worked because I was prompted with

Let Trello OAuth Example use your account?

Upon selecting "Allow", however, I see an empty page with just the text

"invalid token"

Am I using incorrect values in the `.env` file, or something? My only suspicion is that I'm using the wrong TRELLO_KEY because I thought it slightly odd to be using the API Key (as generated by Trello) as if it were the OAuthV1 HMAC Consumer Key, but I assumed that this is just how Trello implements OAuthV1. I found no explicit mention of what the Consumer Key is supposed to be, for what that's worth.

Victor Purolnik September 7, 2018

@tnnnguyenhere's the thing, I did get it working - but I literally changed nothing in my code.

All I did is sign up for a brand new Trello account and use those credentials as API key and secret - and they worked, while the creds of my old Trello account resulted in a 500 error with no error message.

So I literally have no idea what was wrong and since it all works with the new creds, I believe my code was correct and this is a bug on Trello's side, but can't say for sure.

Sorry I can't be of any more help.

Tuan Nguyen September 7, 2018

Thanks for the response, Victor.

I just borrowed a colleague's (key + secret) to see if maybe it's just my credentials are that busted, but the Trello OAuth glitch example didn't work with those credentials either.

Really hoping to hear back from Bentley / a Trello representative on this one -- @Syauqi can you also look over my case and maybe submit a request on the Trello Support Channel on my behalf?

I'm reluctant to go up the contact chain https://trello.com/contact and reach out to support because I feel like there's already so much context between this thread and my own thread.

Syauqi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2018

Sorry for the delay @Tuan Nguyen, I've submitted Trello ticket to further look into the issue. You'll get a response from the Trello Support team soon.

Cheers

Tuan Nguyen September 17, 2018

Hi @Syauqi,

Actually, I went ahead and contacted support, and I've been helped already. The resolution to my issue was posted as an answer to my Question linked above.

Thank you for the followup,

Tuan

Syauqi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2018

Sorry for the confusion and thanks for the update @Tuan Nguyen :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events