YouTube

API

Code requiring an integration for YouTube are given access to make requests on the Users' behalf. All requests are automatically authenticated.

Here is an example of requesting the statistics for the currently authenticated User from YouTube:

const response = await window.casthub.fetch({
    integration: 'youtube',
    method: 'GET',
    url: 'channels',
    data: {
        part: 'statistics',
        mine: 'true',
    },
});

This supports the YouTube Data API v3 reference.