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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 API Post broken

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

 

2 answers

2 accepted

0 votes
Answer accepted
Iain Dooley Community Leader Sep 09, 2020

@Mark Warburton you'll probably have more luck asking this question on the developer community:

https://community.developer.atlassian.com/

0 votes
Answer accepted

@Iain Dooley Thanks. I'll do that.

Suggest an answer

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

📹 What is Trello?

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...

817 views 13 30
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