openapi: 3.0.3 info: title: Roku External Control Protocol (ECP) Apps serviceaccounts API version: '1.0' description: 'The External Control Protocol (ECP) is an HTTP-based API exposed on port 8060 of every Roku streaming device on the local network. It enables third-party applications, mobile remote-control apps, automated testing systems, and home-automation hubs to discover Roku devices via SSDP, inject simulated remote-control key presses, launch installed apps with deep-link parameters, query device state, and retrieve diagnostic information. The protocol is plain HTTP/1.1 (no TLS) and is intended for trusted local-network use only. Most control operations require the user to enable "Control by mobile apps" on the device. Additional diagnostic endpoints (chanperf, sgnodes, registry, etc.) are gated behind Roku Developer Mode. ' contact: name: Roku Developer Program url: https://developer.roku.com x-generated-from: documentation x-source-url: https://developer.roku.com/docs/developer-program/dev-tools/external-control-api.md servers: - url: http://{rokuDeviceIp}:8060 description: A Roku device on the local network variables: rokuDeviceIp: default: 192.168.1.100 description: The IPv4 address of the Roku device, discovered via SSDP tags: - name: serviceaccounts paths: /api/v1/serviceaccounts/login: post: tags: - serviceaccounts summary: Roku Login Token operationId: serviceaccounts-login_token requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Body_serviceaccounts-login_token' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/OIDCTokenResponseModel' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: OIDCTokenResponseModel: properties: access_token: type: string title: Access Token refresh_token: anyOf: - type: string - type: 'null' title: Refresh Token expires_in: type: integer title: Expires In refresh_expires_in: type: integer title: Refresh Expires In token_type: type: string title: Token Type scope: type: string title: Scope type: object required: - access_token - expires_in - refresh_expires_in - token_type - scope title: OIDCTokenResponseModel description: OIDC Token response model Body_serviceaccounts-login_token: properties: grant_type: type: string pattern: client_credentials title: Grant Type client_id: type: string title: Client Id client_secret: type: string title: Client Secret type: object title: Body_serviceaccounts-login_token HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError