---
title: "Get Twilio media stream url"
method: GET
path: "/mg-genagent/v1/twilio-media-stream-url"
tags: ["Twilio Media Stream"]
---

# Get Twilio media stream url

`GET /mg-genagent/v1/twilio-media-stream-url`

## Request

- Base URL: `https://api.sandbox.asapp.com`
- URL: `https://api.sandbox.asapp.com/mg-genagent/v1/twilio-media-stream-url`
- Auth: API key in header `asapp-api-id` and API key in header `asapp-api-secret`
- TypeScript: <https://skmtc.dev/asapp/apis/mg-genagent-api-router/docs/mg-genagent/v1/twilio-media-stream-url/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns url where Twilio media stream should be sent to.

## Query parameters

- `voiceAgentMode` 'cascade' | 's2s'

## Response `200`

OK - Twilio media stream url in the response body

- object
  - `streamingUrl` string: The websocket URL you provide to Twilio for media streaming.

## Other responses

- `401`: 401 - Unauthorized
- `403`: 403 - Forbidden
- `404`: 404 - Not Found
- `429`: 429 - Too Many Requests
- `503`: 503 - Service Unavailable
- `default`: 500 - Internal Server Error

---

[API](https://skmtc.dev/asapp/apis/mg-genagent-api-router.md) - [All operations](https://skmtc.dev/asapp/apis/mg-genagent-api-router/llms.txt) - [OpenAPI document](https://skmtc.dev/asapp/apis/mg-genagent-api-router/revisions/0abe4f32734e?raw)
