I’m trying to create a card from a template card (which have checklist). I’m getting an response 400. When I remove idCardSource parameter in the params, I’m able to create a new card (Without referring to template card). Can you help me how to use template to create a new card from it. Template ID is correct, I could retrieved the template name with it.
This is what my code is
import requests
api_key = ""
api_token = ":
template_card_id = ‘WyxxZAsh’
new_list_id = “643facf55z954a79e5ff3dca”
new_card_name = “URL CARD”
url = f"https://api.trello.com/1/cards"
query_params = {
“key”: api_key,
“token”: api_token,
“idList”: new_list_id,
“name”: new_card_name,
“idCardSource”: template_card_id,
}
print (query_params)
response = requests.post(url, params=query_params)
print (response)
new_card_data = response.json()
print (new_card_data)