Creating a new card using the Trello API

后端 未结 1 763
慢半拍i
慢半拍i 2021-02-19 10:22

I\'m trying to add a new card to a Trello list but am a bit stuck

I\'ve tried POSTing in two approaches:

  1. https://api.trello.com/1/lists/mylistid/c

相关标签:
1条回答
  • 2021-02-19 11:08
    var newCard = {
       name: CARD_TITLE, 
       desc: CARD_DESC,
       pos: "top", 
       idList: TRELLO_BOARD_LIST_ID
    };
    
    Trello.post('/cards/', newCard, success, error);
    
    var success = function(successMsg) { /* your actions on success case */}
    var error= function(errorMsg) { /* your actions on error case */}
    


    client.js automatically adds app_key + token to url so you dont need to bother about that.

    thats is working for me when using trello client.js . short guide: https://developers.trello.com/get-started/start-building#connect

    Im pretty sure the concept is the same with other languages...

    0 讨论(0)
提交回复
热议问题