API Workflow Example
This page outlines how to use the Phenix APIs to publish and subscribe to content, with links to documentation for the APIs used by the example (REST to create the Channel, EdgeAuth token creation for stream access, and the WebSDK to publish and subscribe).
This example publishes user media, but a similar workflow can be used for publishing content using other sources, as outlined in ingest options.
Create a Channel
Create a Channel using the Create Channel API. The platform's response will include the Channel ID, which you will use in the following steps.
Create a Publish Token
Create a publish token ("for publishing only") using the Edge Auth library with the Channel ID of the Channel you created above.
Create a Viewing Token
Create a viewing token (with no "for publishing only", "for authentication only", or "for streaming only") using the Edge Auth library with the Channel ID of the Channel you created above.