BUG: Tokens API endpoint broken: "invalid token" error

When testing any “tokens” endpoint, it always returns “invalid token” even though the token is 100% correct, as it works for all other (e.g. boards) endpoints.

https://developers.trello.com/reference/#tokenstokenwebhooks => “invalid token”
https://developers.trello.com/reference/#boardsboardid-1 => works perfectly fine (with the same key & token)

The issue exists no matter if we try it with curl from our server or via the API documentation “Try it” button

Unfortunately, I’m not able to reproduce this.

Can you paste the curl command that you’re trying but with token’s value removed? The API key is fine to share but the token should remain secret.

I just filled in my token & key in the above API page & tried it there directly, so I didn’t create the command, but it’s just the one referenced above.
(& then also copied the command from there, but got the same result)

Can you copy the full command into here and share your API key too? I’ll use the API key to look into the logs to see what is happening.

No problem, however since this is private data & this ticket is public I am not sure if that’s a good idea?
Is there any way I can send you the API key privately?

The API key is intended to be publicly available. You are OK to share it on here.

However, you can also email integrations@trello.com and link to this thread.

Thanks, I emailed you with subject “bug-tokens-api-endpoint-broken-invalid-token-error/34595/”

The issue was, that the docs page does NOT fill in the key/token you input into the displayed curl but always shows a default/random token/key in the curl.
This means when you click the copy icon/copy it, the curl you copied is wrong, bc it does NOT contain the tokens/key you specified.