Skip to content

gRPC API

SyncTV public gRPC and HTTP REST share server.port, default 8080.

server.enable_reflection=false by default. Enable reflection temporarily in a test or trusted internal environment to explore services with grpcurl. Use the protobuf files when calling a public instance.

Enable reflection in the deployment configuration, then restart SyncTV:

终端窗口
SYNCTV_SERVER_ENABLE_REFLECTION=true

List services:

终端窗口
grpcurl -plaintext localhost:8080 list
grpcurl -plaintext localhost:8080 list synctv.client.AuthService

Public client services include synctv.client.AuthService, UserService, RoomService, PublicService, EmailService, NotificationService, OAuth2Service, ProviderCommonService, AlistProviderService, BilibiliProviderService, EmbyProviderService, and RtmpProviderService. The public admin gRPC service is synctv.admin.AdminService. The management gRPC service is a separate endpoint named synctv.management.ManagementService; it is not served on server.port.

-plaintext is for local development or trusted internal networks only. Production deployments should use TLS at the proxy or client connection layer.

终端窗口
grpcurl -plaintext -d '{
"username": "alice",
"email": "[email protected]",
"password": "SecurePassword123"
}' localhost:8080 synctv.client.AuthService/Register
终端窗口
grpcurl -plaintext -d '{
"username": "alice",
"password": "SecurePassword123"
}' localhost:8080 synctv.client.AuthService/Login

OpenAPI documents HTTP APIs only. gRPC debugging uses reflection or protobuf files. See OpenAPI Access for Swagger UI and OpenAPI JSON.