How to get the media id (like image_id, video_id) of card?


#1

How to get the media id (sth. like image_id, video_id) of Card ?
We found nothing about that in the response like the following.

$ twurl -H ads-api.twitter.com -X GET "/3/accounts/18ce54iditw/cards?card_uri=card://978109038272528385" | jq '.'
{
  "request": {
    "params": {
      "card_uri": "card://978109038272528385",
      "account_id": "18ce54iditw"
    }
  },
  "data": {
    "name": "コピー - eba eqf",
    "website_shortened_url": "https://t.co/zogKmAWwwJ",
    "image_display_height": "100",
    "image": "https://pbs.twimg.com/ad_img/978109022153850880/g-s2glTT?format=jpg&name=orig",
    "preview_url": null,
    "website_display_url": "github.com",
    "id": "5ia38",
    "account_id": "18ce54iditw",
    "website_dest_url": "https://github.com/",
    "created_at": "2018-03-26T03:19:01Z",
    "image_display_width": "100",
    "website_title": "e - copy",
    "card_uri": "card://978109038272528385",
    "website_url": "https://github.com/",
    "updated_at": "2018-03-26T03:47:58Z",
    "deleted": false,
    "card_type": "WEBSITE"
  }
}```

#2

We don’t currently return the media ID as its own attribute in the response. However, you can use the URL in image. Notice that 978109022153850880 is the media ID. Thanks, @wenping.wang.