Create player streamer playback grant
A PlaybackGrant resource allows developers to generate a grant to initialize the Twilio Live Player SDK and connect to a livestream.
Path parameters
-
The unique string generated to identify the PlayerStreamer resource associated with this PlaybackGrant
Body
-
AccessControlAllowOrigin string
The full origin URL where the livestream can be streamed. If this is not provided, it can be streamed from any domain.
-
Ttl integer
The time to live of the PlaybackGrant. Default value is 15 seconds. Maximum value is 60 seconds.
POST /v1/PlayerStreamers/{Sid}/PlaybackGrant
curl \
-X POST https://media.twilio.com/v1/PlayerStreamers/{Sid}/PlaybackGrant \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'AccessControlAllowOrigin=string&Ttl=42'
Request example
{
"AccessControlAllowOrigin": "string",
"Ttl": 42
}
Request examples
{
"AccessControlAllowOrigin": "string",
"Ttl": 42
}
Response examples (201)
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"sid": "string",
"url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"sid": "string",
"url": "https://example.com"
}