WhenHub

Welcome to the WhenHub Developer Platform

Here, you'll find comprehensive guides and documentation to help you start working with WhenHub as quickly as possible, as well as support if you get stuck. Let's jump right in!

If you are new to WhenHub, please take a moment to learn more.

Build VisualizationsVisualizations

Create interesting interactive visualizations for Whencasts.

Get Started

Use the WhenHub APIWhenHub API

Programmatically interact with the WhenHub platform.

Get Started
WhenHub Developer Platform

Use Your Access Token

Once you've gotten your access token, you can now start communicating with the WhenHub API! Below are skeletons of generic requests to an API in different programming languages. These examples will help you get an idea of how you should use your access token in order to get a valid response. Just make sure you do the following:

ACCESS TOKEN

Replace "YOUR_ACCESS_TOKEN" with your WhenHub access token.

API ENDPOINT

Replace "WHENHUB_API_ENDPOINT" with the URL that you are trying to communicate with.

HTTP VERB

Replace "HTTP_VERB" with the http verb that corresponds to the API end point that you are trying to communicate with. More info about http verbs can be found in the About the API section.

var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("HTTP_VERB", "WHENHUB_API_ENDPOINT");
xhr.setRequestHeader("authorization", "YOUR_ACCESS_TOKEN");

xhr.send(data);
import requests

url = "WHENHUB_API_ENDPOINT"

headers = {
    'authorization': "YOUR_ACCESS_TOKEN"
    }

response = requests.request("HTTP_VERB", url, headers=headers)

print(response.text)
require 'uri'
require 'net/http'

url = URI("WHENHUB_API_ENDPOINT")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::HTTP_VERB.new(url)
request["authorization"] = '"YOUR_ACCESS_TOKEN'

response = http.request(request)
puts response.read_body
var request = require("request");

var options = { method: 'HTTP_VERB',
  url: 'WHENHUB_API_ENDPOINT',
  headers: 
   { authorization: 'YOUR_ACCESS_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
curl -X HTTP_VERB \
  WHENHUB_API_ENDPOINT \
  -H 'authorization: YOUR_ACCESS_TOKEN' \

Using 'me' in your API calls

'me' can be used in your API calls to the users methods in place of your id, as long as your Access Token is being passed in the header or ULR query parameter. See below for an example:

Get a full list of schedules for the current user

//api.whenhub.com/api/users/{id}/schedules?access_token=ACCESS_TOKEN
vs.
//api.whenhub.com/api/users/me/schedules?access_token=ACCESS_TOKEN

Useful API Calls

Create A Schedule

Add a new schedule to your WhenHub account by posting a Schedule Object to the https://api.whenhub.com/api/users/me/schedules API endpoint. The minimum requirement for creating a new schedule is the name of the schedule. See the Create A Schedule section of our reference page for more information on how to do this.
Try it out!

Create An Event

Add a new event to a schedule by posting an Event Object to the https://api.whenhub.com/api/schedules/id/events API endpoint. The minimum requirements for creating a new schedule is a name and a start date. See the Create a new event section of our reference page for more information on how to do this.
Try it out!

Add Media To An Event or Schedule

Add media to an event by posting to the https://api.whenhub.com/api/events/eventId/media API endpoint. The minimum requirement is the eventId of the event that you want to add the media to.
Try adding media to a Schedule! Try adding media to an Event!

Add Editors To A Schedule

Add new editors and viewers to a schedule by email using the /schedules/{id}/editors/email endpoint. Find out more about it here: Add a New Editor to a Schedule
Try it out!