# GET MEDIA URL FROM MEDIA ID

**GET** `/{mediaid}`

Product: [WhatsApp](https://devdocs.pinnacle.in/docs/whatsapp.md)  
Version: [3.0](https://devdocs.pinnacle.in/docs/whatsapp/3-0.md)

This API is used to get the media url by passing the mediaid as parameter in the URL.

## Request

URL: `https://partnersv1.pinbot.ai/v3/{mediaid}`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "phone_number_id": {
      "type": "string",
      "x-parameter-in": "query"
    }
  }
}
```

### Request example


```json
{
  "phone_number_id": "{phone_number_id}"
}
```

## Response schema


```json
{
  "type": "object",
  "properties": {
    "raw_example": {
      "type": "string"
    }
  }
}
```

## Response examples


```json
{
  "200": {
    "raw_example": "{\n\"url\":\n\"https:\n254&ext=1716536800&hash=ATtFkAs7t1xlhx9wik43m7NBRARfMzfh6Vi_IvgzzxkQsQ\",\n\"mime_type\": \"image/png\",\n\"sha256\":\n\"ee490eac2a7b038413ab2fb0bfc6db02d9a68e015d92e917fbcee9e324a96810\",\n\"file_size\": 436484,\n\"id\": \"7609700182448254\",\n\"messaging_product\": \"whatsapp\"\n}\n"
  }
}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "The request was successful."
  },
  {
    "code": 400,
    "description": "Bad request or invalid parameters."
  },
  {
    "code": 401,
    "description": "API key is missing or invalid."
  },
  {
    "code": 403,
    "description": "The request is not authorized for this resource."
  },
  {
    "code": 404,
    "description": "The requested resource was not found."
  },
  {
    "code": 500,
    "description": "The server encountered an error."
  }
]
```
