API applications can be created in the VHX admin or by emailing api@vhx.tv
Looking for an API client that uses Promises or async/await? Try the new vhx-js client library: https://github.com/vhx/vhx-js
We welcome bug reports and pull requests!
npm install vhx
Documentation, including a step-by-step tutorial is available on the VHX Developer Docs site. For Full API reference go here.
Before requesting your first resource, you must setup your instance of the VHX Client:
var vhx = require('vhx')('your VHX API key');
Every resource method has two arguments. The first argument is an options object or identifier and the second, an optional callback:
// example customer create
vhx.customers.create({
email: 'customer@email.com',
name: 'First Last'
}, function(err, customer) {
// err, = error is false if no error occurred
// customer = the created customer object
});
Headers can be passed in as the last argument, which would either be the second or third argument depending on the method. See each individual method for specifics.
// example video create with header
vhx.videos.create({
title: 'My Video',
}, { 'VHX-Client-IP': '0.0.0.0' }, function(err, customer) {
});
products
customers
videos
collections
authorizations
analytics