Skip to main content
Skip table of contents

Spotify Connector v1.0

1. General Information

Log in to https://developer.spotify.com/dashboard/login with your Spotify Credentials. Spotify Premium subscription is needed to run all actions.

Create an app if you do not have one by clicking “CREATE AN APP”, after creating a new app, app dashboard will be opened, then click “EDIT SETTINGS”

In there enter redirect URIs below and save them.

 

Then go back to dashboard and click “SHOW CLIENT SECRET“ and get your Client ID and Secret

After that, go to Connection Page in OneTeg. Enter Client ID and Secret from previous step and enter following line into Scopes (Comma Seperated) and save.

CODE
app-remote-control,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private,user-library-read,user-library-modify,user-read-private,user-read-email,user-follow-read,user-follow-modify,user-top-read,user-read-playback-position,user-read-playback-state,user-read-recently-played,user-read-currently-playing,user-modify-playback-state,ugc-image-upload,streaming

 

Spotify authentication is ready!


2. Connector Action & Tests

This document will focus on two actions that are required to Play a song. Others will not be considered, and they are not tested.

Before running these actions, please open a Spotify app from your PC (Web App or Desktop App) or your mobile device. It will be better to use only one device for demos. Most of the tests are done via PC Web App from https://open.spotify.com/

Action Name / METHOD

Player: Get Available Devices (GET)

 

Action Description

Lists the available connected devices to Spotify (PC Web, PC Desktop APP, phone. etc., there can be multiple PC Web devices if there are more than one tabs of Spotify are opened in browser)

 

Request Body Name

Parameter

Type

Description (Example)

Output (JSON)

-

-

-

-

List of devices represented as an array

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

WARNING Please note that there can be more than one device listed in JSON Array, we have to choose the correct one in the next step, i.e., if we want to play in our PC, we should select the id of that. Name and Type fields have the information about the device.

 

Action Name / METHOD

Player: Start/Resume Playback (PUT)

Action Description

Resume the currently paused song or start a new song

Request Body Name

Parameter

Type

Description (Example)

-

Device Id

String

Device id taken from previous steps, ex: 24ccdfba5e1ba26a1165ebb47fc43dc69f1d49b6

Options

Context Uri

String

If empty, currently paused song will be resumed.

If not empty, we should enter Spotify URI (ex: spotify:album:3N6xPkeNVQnmTQue6ySZY3), this uri can be taken from url and modified by changing album/3N6xPkeNVQnmTQue6ySZY3 into album:3N6xPkeNVQnmTQue6ySZY3 and adding spotify: as a prefix => spotify:album:3N6xPkeNVQnmTQue6ySZY3, see image below.

Spotify may not play tracks directly, therefore it will be better to select albums. Playlists can also work. For now, we can run the first song of the album/playlist from OneTeg. Needs improvement.

 

 

 

 

 

 

 

 

WARNING Sometimes selected device can become non-active (can be seen from is_active field from the previos step) if not used for a time, you may need to make that device active (clicking Play and Pause in that device) in order to play the music.

Action Name / METHOD

 

Action Description

 

Request Body Name

Parameter

Type

Description (Example)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


3. Connection Settings and Configuration

image-20250101-211440.png

After save operation, click the same Spotify connection again and click Sign In button. Enter your Spotify credentials in the opening window and click OK (or any other approval button).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.