Download Media

Use this API to download the media associated with the app based on media ID at an app level.

Request Parameters

Key

Description

Value

Data type

Required/Optional

Constraints

Authorization

Access Token for the application

{{PARTNER_APP_TOKEN}}

String

Required

Should be a valid Partner App Access Token

appId

App ID to fetch the access token

{{APP_ID}}

String

Required

  • 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

fileName

Name of the file where the media is being dowloaded

Valid file name

mediaId

Media ID of the media which is being downloaded

Valid 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 Code

Response

Comments

Success

200

Downloaded 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

Language
Click Try It! to start a request and see the response here!