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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Trello OAuth - 500 Server Error?

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 Sep 03, 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.

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 Sep 03, 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

Thanks Syauqi! :)

Syauqi Atlassian Team Sep 03, 2018

No worries Victor, glad we could help! 

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 Sep 06, 2018

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

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.

@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.

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 Sep 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

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 Sep 17, 2018

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

Develop a new Habit during Lockdown

If you had to thrive a new habit during a lockdown, what would it be? Trello

1,665 views 16 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you