Skip to main content
GET
/
{media_id}
Get media URL
curl --request GET \
  --url https://api.kapso.ai/meta/whatsapp/{media_id} \
  --header 'X-API-Key: <api-key>'
{
  "messaging_product": "whatsapp",
  "url": "https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=2621233374848975&ext=1234567890&hash=...",
  "mime_type": "image/jpeg",
  "sha256": "81d3bd8a8db4868c9520ed47186e8b7c5789e61ff79f7f834be6950b808a90d3",
  "file_size": "303833",
  "id": "2621233374848975"
}

Authorizations

X-API-Key
string
header
required

Project API key for authentication. This is the recommended authentication method.

Get your API key from the Kapso dashboard under Project Settings > API Keys.

Path Parameters

media_id
string
required

Media ID returned from upload

Query Parameters

phone_number_id
string

Optional - verify media belongs to this phone number

Response

Media URL retrieved successfully

messaging_product
enum<string>
Available options:
whatsapp
Example:

"whatsapp"

id
string

Media ID

Example:

"2621233374848975"

url
string<uri>

Temporary download URL (valid for 5 minutes)

Example:

"https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=..."

mime_type
string

MIME type

Example:

"image/jpeg"

sha256
string

File hash

Example:

"81d3bd8a8db4868c9520ed47186e8b7c5789e61ff79f7f834be6950b808a90d3"

file_size
string

File size in bytes (returned as string)

Example:

"303833"