Download Media

Use this API to download or retrieve media files using their media ID. This endpoint allows you to access media files that were previously uploaded through the Generate Media ID API, enabling you to download images, videos, documents, and audio files.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
ℹ️

Important Note:

  1. Valid media ID required (obtained from media upload API)
  2. Media must belong to the requesting app
  3. Rate limit: 5 requests per hour (3600 seconds)

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{APP_ID}}StringRequired
  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used
fileNameName of the file where the media is being dowloadedValid file name
mediaIdMedia ID of the media which is being downloadedValid media ID associated with the given app ID

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/:appId/media/:mediaId' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--output {{fileName}}

Sample Response

Downloaded media stream

Status Codes

Status CodeResponseComments
Success
200Downloaded media stream
Error
400

{

"status":"error","message/data":"Specific to API"}

Error with respect to API
401

{

"status":"error","message":"Unauthorized Access"}

When authentication fails
500

{

"status": "error","message": "Internal Server Error"}

For any Internal Error
Path Params
string
required

Unique identifier of the app.

string
required

Unique identifier of the media.

Headers
string
required

Your app token, please refer Get access token api to get the token from partner documentation.

Responses
200

Successful Media Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json