Below you'll find tutorials for using the VHX API to integrate your experiences with our video services. Use the code toggle above to see code examples in your language of choice.
For more in depth information on all our available endpoints see the full API Reference. For more information on using our client libraries see the languages listed to the left.
Once you have your videos uploaded you'll need a way for customers to access your content. Content can be accessed by creating a product. Products allow you to specify what the access agreement is and what videos/collections are associated with that product. An access agreement can one of the following:
Products can be created via the VHX Dashboard. You'll need a reference to the product you create in subsequent API calls: the product href can be retrieved for any product after creation in the dashboard. It follows a similar pattern to videos, https://api.vhx.tv/products/:id.
Once you have your videos and products ready to go you'll be ready to accept customers. To give access to your products you will need to create a customer. To create a customer with the API you must the customer name, email, and product you're granting them access to.
The final step is to grant a customer access to a specific video via authorizations and the VHX HTML5 player. You can specify how long a particular session token lasts. Once a token expires, you will need to re-authenticate your customer and create a new authorization token. To create an authorization token for a customer with the API:
From our previous authorization call we'll get back an object with all that we need to include an authorized instance of your video. You can either include the VHX Player yourself with the video and authorization token or simply output the player embed from the object embed property:
To make integrating with the VHX API as easy as possible we offer several client libraries. Installation instructions below. If your language of choice is not included, please let us know!