Hello,
I'm trying to get a trello token by simulating a post request to https://trello.com/1/token/approve
but trello response me with a message: member not authenticated,
Maybe I'm missing something, but I can't figure it out, the python code is below
import requests
data = {
"requestKey": "e06ffc8448981a72e9f2238d992c46b",
"signature": "1242539370258/19254ccdb38731b158958caa2f7b3344a10bf9d38804a4bb41f0sd67f2d4b680",
"approve": "Allow"
}
r = requests.post("https://api.trello.com/1/token/approve", data=data)
# Get the raw body text back
body = r.text
print("body: " + body) // trello response: Member not authenticated
Hi There 👋
I think you found us in the Trello Community Slack, but I figured I'd also answer here in case its helpful to other folks.
The issue here appears to be that that route is the final part of the implicit OAuth consent flow. You should direct a user to the authorize URL: https://trello.com/1/authorize with an appropriate set of query params. After which, if they approve, you’ll be granted a token. You purposefully can’t programmatically generate a token without the user’s consent.
If you go with the implicit flow, usually the way to get the token back to your service is to have some javascript on the page you set as the return_url that reads the token and POSTs it to your service.
Another option if you want to avoid the client-side javascript route, is to use Oauth1.0a, generally with a library for your language of choice, and the routes documented at https://developers.trello.com/authorize
Lastly, if you are just looking to get a one time token to use for yourself, you will find there is a link to generate one for yourself from the https://trello.com/app-key page.
Hope that helps. And feel free to continue to reach out with questions in the Trello Community Slack.
I'm having the same issue with multiple users on my team. I'm so lost. Mine works fine and we all have the same rights etc. What should I tell them to do? or is it me who should "approve" something? Any step by step would be so helpful!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.