{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Cloud Phone Live Streaming"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cloud-phone-live-streaming","__idx":0},"children":["Cloud Phone Live Streaming"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use either the Open API or Local API to upload one MP4 file, start live streaming, inspect its status, and stop it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-paths","__idx":1},"children":["API paths"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Open API"},"children":["Open API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Local API"},"children":["Local API"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query balance and quotas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /balance"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/balance"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Start streaming"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/start"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/live/start"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Query streaming status"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/live/status"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Stop streaming"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/end"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/live/end"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use a WUIN or Xiaosuan Cloud Phone model. Other providers currently return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Power on the Cloud Phone before starting or stopping a stream."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Obtain an OAuth2 Bearer token and permission to operate the Cloud Phone."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Live-streaming files must be MP4 files uploaded with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType=2"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"open-api-workflow","__idx":3},"children":["Open API workflow"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadUrl"]},", then upload the MP4 bytes to the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," with HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFile"]}," with the uploaded object URL, destination directory, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Poll ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFileResult"]},". If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", the file is not visible yet; continue polling. Stop when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," (success) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," (failed)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Keep the returned string ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.fileId"]}," and send its exact numeric value as an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["int64"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/start"]},". Clients such as JavaScript must use an arbitrary-precision serializer instead of converting the value through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Number"]},"."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"phoneId\": 190000000000000001,\n  \"fileId\": 820000000000000001\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/status"]}," to check whether the stream is running, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/end"]}," to stop it. Both accept ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"phoneId\": 190000000000000001 }"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"local-api-workflow","__idx":4},"children":["Local API workflow"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/upload/file/signedUrl"]},", then upload the MP4 bytes to the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," with HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/upload/file"]}," with the uploaded object URL, destination directory, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Poll ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/upload/file/result"]},". If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", continue polling; stop when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.status"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Send the exact numeric value of the returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.fileId"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/cloudphone/live/start"]},". Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/live/status"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/live/end"]}," to inspect or stop the stream."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/cloud-phone/open-api"},"children":["Cloud Phone Open API"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/cloud-phone/local-api"},"children":["Cloud Phone Local API"]}," for complete schemas."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"retry-and-error-handling","__idx":5},"children":["Retry and error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a start request times out, query the status before retrying. Do not assume that a timeout means the stream did not start."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33300"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cloud Phone does not exist"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33301"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cloud Phone is not powered on"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This Cloud Phone does not support live streaming"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33418"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Live-streaming file does not exist or is no longer valid"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33419"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudphone/uploadFile"]}," rejected a live-streaming file that is not MP4"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["99002"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The current member cannot operate this Cloud Phone"]}]}]}]}]}]},"headings":[{"value":"Cloud Phone Live Streaming","id":"cloud-phone-live-streaming","depth":1},{"value":"API paths","id":"api-paths","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Open API workflow","id":"open-api-workflow","depth":2},{"value":"Local API workflow","id":"local-api-workflow","depth":2},{"value":"Retry and error handling","id":"retry-and-error-handling","depth":2}],"frontmatter":{"seo":{"title":"Cloud Phone Live Streaming"}},"lastModified":"2026-08-28T16:11:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/cloud-phone/live-streaming","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}