Spotify

API

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

Here is an example of requesting the current song from Spotify:

const response = await window.casthub.fetch({
    integration: 'spotify',
    method: 'GET',
    url: 'me/player',
});

This supports the Spotify API reference.