What You’ll Need
Before you begin, ensure you have:- A BMDRM account (Log in or sign up for a free trial).
- Have your API key prepared. To learn how to obtain your Streaming API key, see Obtaining your API key.
- The requested video to be uploaded and ready.
How to create streaming sessions
Make an authenticated POST request to the following endpoint:apiKey: Your Streaming API key.accept: Must beapplication/json.
videoId: The ID of the video to play. This is theuploadJobIdreturned during the upload initialization step.userId: The user’s identifier in your system. This value is rendered into the session’s visible watermark.
200 OK with the new session object.
edge: A CDN edge url, responsible for serving the created session (string)videoId: The ID of the requested video (uuid)signature: A session signature to be verified by BMDRM (string)userId: The user ID supplied by the client (string)subscriptionId: The corresponding ID of the client subscription (uuid)sessionId: The ID of the one-time use session (uuid)nonce: One-time use number (string)date: Timestamp of session creation (number)
The player needs every field from this response object to authenticate in the next step.
Session lifetime
- Each session is valid for a single playback. Requesting playback again with the same
sessionIdandnoncewill fail.
Web-only streaming sessions
View the deprecated web-only method
View the deprecated web-only method
Make an authenticated POST request to the following endpoint:Headers:Response schema:The response will return a web-only session object, including:
apiKey: Your Streaming API keyaccept: application/json
videoId: The ID of the video to play. This is theuploadJobIdreturned during the upload initialization step. (uuid)userId: The user’s identifier in your system. This value is rendered into the session’s visible watermark. (string)
urlToEdge: A session url that could be opened independantely in the browser or integrated in your web application

