webcast_idstringobrigatório
Webcast id
https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-idConverts a Douyin webcast ID into its corresponding room ID. Submit a webcast ID to retrieve the matching livestream room identifier for Douyin web workflows.
[
{
"data": {
"room_id": "Error webcast_id"
}
}
]Selecione um exemplo para carregar as entradas e o resultado no playground.
This API converts a Douyin webcast ID into the livestream room ID that matches it. It needs one input, webcast_id, and returns a single room_id value.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"webcast_id": "775841227732"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
webcast_id | string | Yes | Webcast id |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"room_id": "7624919954380180276"
}
| Field | Meaning |
|---|---|
room_id | The livestream room ID that matches the submitted webcast_id. This is the only field in the response. |
room_id | The value is a string of digits, such as 7624919954380180276. Keep it as a string so tools do not round the long number. |
room_id | Use this value as the room identifier in other Douyin live APIs that ask for a room ID. |
webcast_id as a string. The example value is 775841227732.room_id.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webcast_id": "example"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
webcast_idstringobrigatórioWebcast id
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
[
{
"data": {
"room_id": "Error webcast_id"
}
}
]Explorar mais
| API | Preço | Resposta |
|---|---|---|
Douyin Webcast ID to Room IDEsta API Douyin | $0.001 por chamada | JSON |
Douyin | $0.001 por chamada | JSON |
Douyin | $0.001 por chamada | JSON |
Douyin | $0.001 por chamada | JSON |
Douyin | $0.001 por chamada | JSON |
Douyin | $0.03 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/douyin/web/webcast-id-2-room-id com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.001 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: webcast_id (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Douyin Webcast ID to Room ID funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Douyin separadamente.