Pause playlist

Sections

Theme switcher

STYNGR API

STYNGR API can be used to play licensed music inside of your application by creating many different playlists that end users can choose from, offering radio-like experience by allowing users to choose playlist which suits their taste. Songs are randomly chosen from selected playlist and if end user does not like a certain song, they have an option to skip a song, up to 6 times within one hour period.

Our API endpoints are secured with two kind of JWT tokens with different scopes, which are issued to each end user separately.

Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

https://api.styngr.com

Staging:

https://stg.api.styngr.com

Language Box

Was this section helpful?

What made this section unhelpful for you?

Authentication

Was this section helpful?

What made this section unhelpful for you?

Styngs

Styngs are in-game emotes followed by up to 30 seconds long song clips. Users can buy styng which they can bind to an application event. Once the application user triggers an application event, styng can be reproduced, so that nearby players can hear their styng. Styngs can also be preloaded during loading of game session, by pulling binded styngs of each user in that game session.

Application Errors

Allow game developers to send errors messages they have encountered

User Event Tracking

Application Tests

Application Events

Application events are in-game events to which users can bind their Styngs. Example of application events would be a headshot, scored goal or player spawning at the base.

Notifications

Notification APIs for application end user.

Payment Transactions

Payment transactions are created for every product purchase, e.g. Styng, Stynglist or Radio Subscription, with external payment system handling the actual payment processing. Applications that implement Styngr API must use the payment confirmation API in order for user to obtain access to their bought product.

Promo messages

Radio Subscriptions

Radio subscriptions allow user to listen to your application's playlist, without Ads. At the moment, user can choose between following subscription types: Monthly, Stream-count based, or Playback-time based. Monthly subscriptions, as their name suggests, allow users to have an unlimited radio listening experience for thirty days after their subscription purchase. Monthly subscriptions can be renewed at any point in time, while they are in active or pending payment state. Stream-count subscriptions offer a limited number of tracks which users can listen to. Every single request that returns a random track is counted towards this quota. Once the quota is spent, users will have to purchase a new subscription, or they will be back on Ad-funded listening experience if it's available in your application. Playback-time based subscriptions offer a limited number of minutes to which users can listen to. Once the quota is spent, users will have to purchase a new subscription, or they will be back on Ad-funded listening experience.

SDK Users

APIs related to application end users, which allows operations such as in-game currency balance update and addition of Styngs/Stynglists as rewards to users.

Soundboards

Soundboards are collection of chosen styngs for your application that application users can subscribe to and use during their game session. Application can have multiple soundboards but only one published soundboard per source.

Stynglists

Stynglists are collection of Styngs which allows user to buy multiple Styngs more easily.

LSR styngs

LSR styngs are in-game emotes followed by up to 30 seconds long song clips. Users can buy LSR styngs which they can bind to an application event. Once the application user triggers an application event, LSR styngs can be reproduced, so that nearby players can hear their LSR styng. LSR styngs can also be preloaded during loading of game session, by pulling binded LSR styngs of each user in that game session.

styng-statistics-controller

Spotify

Styngr integration with Spotify music platform.

Playlists V3

Royalty free playlists are set of songs that are linked to a single application, which allows users of that application to choose which music they will listen to during their game session. These songs are randomly selected from the playlist, and there is no skip limit for them.

Playlists V2

Playlists are set of songs that are linked to a single application, which allows users of that application to choose which music will they listen to during their game session. Users can skip through songs for up to 6 times during one hour period.

Playlists V2 - API Integration

Playlists are set of songs that are linked to a single application, which allows users of that application to choose which music will they listen to during their game session. Users can skip through songs for up to 6 times during one hour period.

Was this section helpful?

What made this section unhelpful for you?

Start a playlist session

Create a new session for specified playlist and return its first track.

Header Parameters

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID for which a new session will be created.

Response

200
Object
Session ID.

Response Attributes

sessionIdstring (uuid)Required
trackobject Required

Show child attributes

401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/start?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 curl --location --request POST 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/start?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}'

Response

Session ID.
Was this section helpful?

What made this section unhelpful for you?

Skip to next track

Load a next random track URL from the playlist linked to the session. Should be called when user explicitly requests a new track without previous track being completed.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID for which a skip is requested.

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
Track information and track URL.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Track not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not available. It can also mean that the user reached the skip limit.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/skip?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/skip?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

Track information and track URL.
Was this section helpful?

What made this section unhelpful for you?

Resume playlist

Resumes playlist with previous song that was played.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID which needs to be resumed.

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
URL of previous track that was played.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
409
Object
Session is not paused.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not found or it is not available. It can also mean that the user reached the skip limit or that the user does not have active subscription and selected playlist is of Premium monetization type.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/resume?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/resume?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

URL of previous track that was played.
Was this section helpful?

What made this section unhelpful for you?

Request a next track

Load a next random track URL from the playlist linked to the session.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
Track information and track URL.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist or track not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not available.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/next?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location --globoff 'https://api.styngr.com/api/v2/sdk/integration/playlists/{playlistId}/next?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

Track information and track URL.
Was this section helpful?

What made this section unhelpful for you?

Start a playlist session

Create a new session for specified playlist and return its first track.

Header Parameters

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID for which a new session will be created.

Response

200
Object
Session ID.

Response Attributes

sessionIdstring (uuid)Required
trackobject Required

Show child attributes

401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/start?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 curl --location --request POST 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/start?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}'

Response

Session ID.
Was this section helpful?

What made this section unhelpful for you?

Skip to next track

Load a next random track URL from the playlist linked to the session. Should be called when user explicitly requests a new track without previous track being completed.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID for which a skip is requested.

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
Track information and track URL.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Track not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not available. It can also mean that the user reached the skip limit.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/skip?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/skip?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

Track information and track URL.
Was this section helpful?

What made this section unhelpful for you?

Resume playlist

Resumes playlist with previous song that was played.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID which needs to be resumed.

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
URL of previous track that was played.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
409
Object
Session is not paused.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not found or it is not available. It can also mean that the user reached the skip limit or that the user does not have active subscription and selected playlist is of Premium monetization type.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/resume?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/resume?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

URL of previous track that was played.
Was this section helpful?

What made this section unhelpful for you?

Request a next track

Load a next random track URL from the playlist linked to the session.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
Track information and track URL.

Response Attributes

trackUrlstring (url)
expiresAtstring (date-time)
imageUrlstring (url)
trackIdinteger (int64)
titlestring Required
artistNamesarray Required

Show child attributes

isLikedboolean
audioAssetIdinteger (int64)
customMetadataobject
availableCountriesarray Required
Enum values:
AFAXALDZASADAOAIAQAG
... 239 other enums
Allow unique items
true

Show child attributes

remainingNumberOfStreamsinteger (int32)
remainingNumberOfSecondsinteger (int32)
lastTrackReceivedAtstring (date-time)
approximateTrackElapsedSecondsinteger (int32)
trackTypestring Required
Enum values:
COMMERCIALMUSICALMUSICAL_RF
remainingNumberOfSkipsinteger (int32)
adIdstring (uuid)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Playlist or track not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not available.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/{playlistId}/next?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location --globoff 'https://api.styngr.com/api/v2/sdk/integration/playlists/{playlistId}/next?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

Track information and track URL.
Was this section helpful?

What made this section unhelpful for you?

Performs a track like/unlike

Header Parameters

Authorizationstring

Body Parameters

trackIdinteger (int64)Required

Response

200
Object
Track information and like status.

Response Attributes

trackIdinteger (int64)Required
isLikedboolean Required
400
Object
Bad request with invalid input.

Response Attributes

trackIdinteger (int64)Required
isLikedboolean Required
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Track not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

POST

/api/v2/sdk/integration/playlists/likes

Select
1 2 3 4 5 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists/likes' \ --header 'Authorization: Bearer {token}' \ --data '{ "trackId": null }'

Response

Track information and like status.
Was this section helpful?

What made this section unhelpful for you?

Pause playlist

Pause playlist with last song provided in a session.

Header Parameters

X-App-Versionstring

Application version in which tracks were played.

User-Agentstring

User agent.

Authorizationstring

Query Parameters

protocolstring

Protocol which should be used to reproduce next track from the playlist. Every track URL is a secure HTTPS link.

Enum values:
HTTPHLSHLSE
createAssetUrlboolean

Boolean flag indicating if track audio asset URL should be created for the next track.

includeTrackAvailabilityboolean

Boolean flag indicating if complete set of territory codes in which track is available should be returned in the response.

trackFormatstring

Track container format that should be returned. Defaults to AAC.

Enum values:
AACMP3

Path Parameters

playlistIdstring (uuid)Required

Playlist UUID which needs to be resumed.

Body Parameters

sessionIdstring (uuid)Required
formatstring Required
Enum values:
AACMP3
statisticsarray Required

Show child attributes

trackIdinteger (int64)Required
pausedAtSecondinteger (int32)Required

Response

200
Object
URL of last track that was played.
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
404
Object
Track or playlist not found.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
409
Object
Session already paused or attempt to pause an incorrect track. Currently, the session is not streaming that track.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
422
Object
Playlist is not active or does not match the session, or track is not available. It can also mean that the user reached the skip limit.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

PATCH

/api/v2/sdk/integration/playlists/{playlistId}/pause?protocol=HTTP&createAssetUrl=&includeTrackAvailability=&trackFormat=AAC

Select
1 2 3 4 5 6 7 8 9 10 11 curl --location --request PATCH 'https://api.styngr.com/api/v2/sdk/integration/playlists/123e4567-e89b-12d3-a456-426614174000/pause?protocol=HTTP&trackFormat=AAC' \ --header 'Authorization: Bearer {token}' \ --data '{ "sessionId": "", "format": "AAC", "statistics": [ "" ], "trackId": null, "pausedAtSecond": null }'

Response

URL of last track that was played.
Was this section helpful?

What made this section unhelpful for you?

Get playlists

Load all published licensed playlists assigned to an Application ID stored in User's JWT Token.

Header Parameters

Authorizationstring

Response

200
Object
Array of playlist information.

Response Attributes

playlistsarray Required

Show child attributes

remainingNumberOfStreamsinteger (int32)
401
Object
Access token is not present or expired.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
403
Object
Access is forbidden.

Response Attributes

errorCodeinteger (int32)Required
errorMessagestring
Was this section helpful?

What made this section unhelpful for you?

GET

/api/v2/sdk/integration/playlists

Select
1 2 curl --location 'https://api.styngr.com/api/v2/sdk/integration/playlists' \ --header 'Authorization: Bearer {token}'

Response

Array of playlist information.
Was this section helpful?

What made this section unhelpful for you?

Group sessions - API Integration

Styngr allows users to create a Group Sessions that will allow multiple users to listen to the same tracks at the same time. Group Session API is intended to be used with Playlist API, which means requesting tracks and submitting statistics needs to be performed as for Playlist Sessions for single users. Group Sessions can have two different user types: Owner and Members. Every user can belong only to single Group Session at the time. Every Group Session can have only one Group Session Owner, and multiple Group Session Members. Group Session Owner is responsible for media playback controls, that is, requesting a new track, skipping or pausing the current track. Group Session Members cannot impact listening flow, as they only have to synchronize with Group session Owner's actions. Synchronization between Owner and Members is currently left to implement to applications that are integrating with Styngr API.

Group sessions

Styngr allows users to create a Group Sessions that will allow multiple users to listen to the same tracks at the same time. Group Session API is intended to be used with Playlist API, which means requesting tracks and submitting statistics needs to be performed as for Playlist Sessions for single users. Group Sessions can have two different user types: Owner and Members. Every user can belong only to single Group Session at the time. Every Group Session can have only one Group Session Owner, and multiple Group Session Members. Group Session Owner is responsible for media playback controls, that is, requesting a new track, skipping or pausing the current track. Group Session Members cannot impact listening flow, as they only have to synchronize with Group session Owner's actions. Synchronization between Owner and Members is currently left to implement to applications that are integrating with Styngr API.

Statistics

Used for storing song and ad playback statistics.

Playlists

Playlists are set of songs that are linked to a single application, which allows users of that application to choose which music will they listen to during their game session. Users can skip through songs for up to 6 times during one hour period.

Playlists - API Integration

Playlists are set of songs that are linked to a single application, which allows users of that application to choose which music will they listen to during their game session. Users can skip through songs for up to 6 times during one hour period.

Applications

Styngr allows users to get basic information about applications they are using.

radio-info-controller

Roblox

Web3

Styngr SDK API

Styngr API can be used to play licensed music inside of your application by creating many different playlists that end users can choose from, offering radio-like experience by allowing users to choose playlist which suits their taste. Songs are randomly chosen from selected playlist and if end user does not like a certain song, they have an option to skip a song, up to 6 times within one hour period.
Our API endpoints are secured with two kind of JWT tokens with different scopes, which are issued to each end user separately.

Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

https://api.styngr.com

Staging:

https://stg.api.styngr.com

Language Box

Was this section helpful?

What made this section unhelpful for you?

roblox-campaign-controller

NFTs

Styngr offers an option to purchase an NFT inside of your application. NFTs are usually minted as a short audio snippet from our available pool of tracks. By purchasing an NFT, user will be able to use the NFT inside of your application, by playing an linked audio snippet. They also have an option to claim the NFT, which would transfer the ownership to their Ripple Ledger account. Styngr can at any time burn the NFT, if such need arises from legal perspective, upon request from record labels.

Xumm

Xumm platfrom is a non-custodial wallet that offers users to create/manage their Ripple Ledger accounts. Users can authenticate their wallets in our system through Xumm, which allows them to claim the already purchased NFTs to their Ripple Ledger account.

Radio Subscriptions - v2

Radio subscriptions allow user to listen to your application's playlist, without Ads. At the moment, user can choose between following subscription types: Monthly, Stream-count based, or Playback-time based. Monthly subscriptions, as their name suggests, allow users to have an unlimited radio listening experience for thirty days after their subscription purchase. Monthly subscriptions can be renewed at any point in time, while they are in active or pending payment state. Monthly subscriptions support multi-tier logic where playlists are divided into several tiers where each tier contains a specific combination of playlists which user is allowed to listen if he has a relevant subscription. Stream-count subscriptions offer a limited number of tracks which users can listen to. Every single request that returns a random track is counted towards this quota. Once the quota is spent, users will have to purchase a new subscription, or they will be back on Ad-funded listening experience if it's available in your application. Playback-time based subscriptions offer a limited number of minutes to which users can listen to. Once the quota is spent, users will have to purchase a new subscription, or they will be back on Ad-funded listening experience.