1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Trello API を使ってCardにLabelを追加する方法

Posted at

概要

Trello API を使って既存のカードへ既存のラベルを追加する方法を説明する。

環境

Python3を使ってHTTPリクエストを行う。

コード

import requests

card_id: str = "cardのID"

payload: dict = {
    "value": "追加したいラベルのID",
    "key": "アプリケーションキー",
    "token": "アプリケーショントークン"
}

requests.post(f"https://api.trello.com/1/cards/{card_id}/idLabels", data=label_payload)

参考

Add a Label to a Card

trello-api
ちゃんと、QUERY PARAMETERSとして書かれていたのに、見落としていて時間をかけてしまった。。。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?