Hi people,
I can use the API project key and user token to view cards in trello. Up until recently, I could also post files onto those trello cards. Is the API partially broken at the moment or has something changed?
The error I now receive (in myJson.response) is:
<Response [404]>
I recreated my token and ensured it was marked for read and write permissions. From the 404 error, it appears to be a permissions issue, but the card being written to is newly created and using the same account tied to that token.
Any other ideas?
Thanks
Regards
Mark
Here is my python function:
def addCardAttachment(trelloKey, trelloToken,filePath,cardId):
import requests
import json
url = f"https://api.trello.com//1/cards/{cardId}/attachments"
headers = {
"Accept": "application/json"
}
query = {
'key' : trelloKey,
'token' : trelloToken,
}
files = {
'file': open(filePath, 'rb'),
}
response = requests.request(
"POST",
url,
headers=headers,
params=query,
files=files
)
myJson = json.loads(response.text)
return myJson
@Mark Warburton you'll probably have more luck asking this question on the developer community:
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.