Using Trello API, how can I resolve a card's link (url) into its ID?

Hi there,

I have an automation use-case where, out of a card link (or shortLink), I need to perform some API actions on that card. But the /cards API can only take card id or shordId.

Is there any way to map the card link to its ID?

Thanks in advance!

I could probably iterate over all the cards of the board, retrieved with the /beoard/{id}/cards API.
But I was wondering if there was a more efficient way to do it?

The cards resource will take the shortLink from in place of an ID.

For instance, we have this URL for a public card:

We can pass its shortLink, 3CsPkqOF, to the 1/cards/{idCard} route:

Keep in mind that this works without any API key/token because it is a public card. You’d need to provide an API key and token for non-public cards.

Thanks very much, that works!
My bad I had tried it before but wasn’t invoking the API properly (used parms instead of url parameter for passing the ID).