GraphQL API: Playback
Skip to the next or specific track
Tracks in the playback queue can be skipped. It returns the MutationStatus
to indicate the success of the skip and it returns the next item in the playback queue. Some subscription tiers have skip limits and if this is reached an error will be returned.
Podcast episodes, video ads and audio ads cannot be skipped.
If for some reason you want to check if a skip will be successful without performing the skip, you can use the checkOnly
field. This will return the same results (status and next item in queue) but not perform the skip. If a skip would not be successful it will return an error.
The index
field value should be set to the current track index that you want to skip.
The targetIndex
field can be used if you want to skip to a specific index and not the next item in the queue. This feature is limited to Premium users and only allowed for on-demand sources (like albums), other sources can only take the next or previous index. The latter will perform a replay for Plus and Premium Users. For a Free user, the targetIndex
field provides a normal skip (to next item in queue).
The itemId
field can be used if you want to skip to a specific pandora Id
within a source. This is available for on-demand sources (like albums), but not for stations.
Mutation
mutation {
playback {
skip(deviceUuid: "deviceXYZ", sourceId: "AL:1811731", index: 1, elapsedTime: 200) {
status
current {
... on TrackItem {
track {
name
}
}
}
}
}
}
* Add your OAuth bearer token to the Authorization
header
curl 'https://ce.pandora.com/api/v1/graphql/graphql' \
-H 'Authorization: Bearer ' \
-H 'Content-Type: application/json' \
-d '{"operationName":null,"variables":{},"query":"mutation { playback { skip(deviceUuid: \"deviceXYZ\", sourceId: \"AL:1811731\", index: 1, elapsedTime: 200) { status current { ... on TrackItem { track { name } } } } }}"}'
Response
{
"data": {
"playback": {
"skip": {
"status": "OK",
"current": {
"track": {
"name": "Sunday"
}
}
}
}
}
}