fetchMedia
Fetch a single Media resource associated with a specific Message resource
Details
- Method:
GET - Path:
/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Media/{Sid}.json - Operation ID:
FetchMedia
Parameters
{
"AccountSid": {
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Media resource.",
"required": true,
"location": "path",
"type": "string"
},
"MessageSid": {
"description": "The SID of the Message resource that is associated with the Media resource.",
"required": true,
"location": "path",
"type": "string"
},
"Sid": {
"description": "The Twilio-provided string that uniquely identifies the Media resource to fetch.",
"required": true,
"location": "path",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"account_sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^AC[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with this Media resource."
},
"content_type": {
"type": "string",
"nullable": true,
"description": "The default [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) of the media, for example `image/jpeg`, `image/png`, or `image/gif`."
},
"date_created": {
"type": "string",
"format": "date-time-rfc-2822",
"nullable": true,
"description": "The date and time in GMT when this Media resource was created, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
},
"date_updated": {
"type": "string",
"format": "date-time-rfc-2822",
"nullable": true,
"description": "The date and time in GMT when this Media resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
},
"parent_sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^(SM|MM)[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The SID of the Message resource that is associated with this Media resource."
},
"sid": {
"type": "string",
"minLength": 34,
"maxLength": 34,
"pattern": "^ME[0-9a-fA-F]{32}$",
"nullable": true,
"description": "The unique string that identifies this Media resource."
},
"uri": {
"type": "string",
"nullable": true,
"description": "The URI of this Media resource, relative to `https://api.twilio.com`."
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('twilio')
# Call this tool
result = await agent.call_tool('fetchMedia', {
# Add required parameters here
})