Tokens are used in conjunction with an API key to access the Trello API.
Retrieve information about a token
API Call
/GET /1/tokens/55411859be21b8ad7dcd4c78?webhooks=true
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.getToken({ webhooks: true });
Retrieve information about a token's owner by token
API Call
/GET /1/tokens/55411859be21b8ad7dcd4c78/member
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.member()
.getMember();
Retrieve all webhooks created with a token
API Call
/GET /1/tokens/55411859be21b8ad7dcd4c78/webhooks
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.webhooks()
.getWebhooks();
Retrieve a webhook created with a token
API Call
/GET /1/tokens/55411859be21b8ad7dcd4c78/webhooks/f2c444c982eb19a7e5b5c423
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.webhooks("f2c444c982eb19a7e5b5c423")
.getWebhook();
Create a new webhook for a token
API Call
/POST /1/tokens/55411859be21b8ad7dcd4c78/webhooks?idModel=54a17d76d4a5072e3931736b&description="My Webhook"&callbackURL=https://mycallbackurl.com
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.webhooks()
.addWebhook({
idModel: "54a17d76d4a5072e3931736b",
description: "My Webhook",
callbackURL: "https://mycallbackurl.com",
});
Update an existing webhook
API Call
/PUT /1/tokens/55411859be21b8ad7dcd4c78/webhooks/f2c444c982eb19a7e5b5c423?description="Test Webhook"
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.webhooks("f2c444c982eb19a7e5b5c423")
.updateWebhook({ description: "Test Webhook" });
Delete a token
API Call
/DELETE /1/tokens/55411859be21b8ad7dcd4c78
Trello for Wolves
const response = await trello.tokens("55411859be21b8ad7dcd4c78").deleteToken();
Delete a webhook created with given token
API Call
/DELETE /1/tokens/55411859be21b8ad7dcd4c78/webhooks/f2c444c982eb19a7e5b5c423
Trello for Wolves
const response = await trello
.tokens("55411859be21b8ad7dcd4c78")
.webhooks("f2c444c982eb19a7e5b5c423")
.deleteWebhook();