Documentation

GraphQL API: Playback

Peek ahead to see the next track (audio preloading)

Sometimes it is useful to peek at the next track in the playback sequence. This could be used to preload audio, display metadata of what is coming, etc.

Request



{
  playback {
    peek(deviceUuid: "deviceXYZ", sourceId: "AL:1811731") {
      ... on TrackItem {
        audioUrl
        interactions
        track {
	     artist {
            name
          }
          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":"{  playback { peek(deviceUuid: \"deviceXYZ\", sourceId: \"AL:1811731\") { ... on TrackItem { audioUrl interactions track { artist { name } name } } }  }}"}'

Response



{
  "data": {
    "playback": {
      "peek": {
        "audioUrl": "https://audio-dc6-t3-2-v4v6.pandora.com/access/?version=5&lid=1375438868&token=%2BpGIAqaeQBzLufvlPgkaqfMWqKnt6uC3YwreOl8xTHs6nh1DpVQQewJyuEEZhirzKTLA0GsbJoTr9vlzlQLvsMJIY7Qri5KxAVW4opGUNA0YrQVkAShFOjMj6nZRNP0CfcJcvN9TkAKFAImK676DFXJBp69nyE0Abg8YLDazSgdDxc%2BydKcXEv9EI%2BQg0WHoLuFD0zdFbYNM%2BaS7pyIoL%2B2nV6sIMspuoMFeTcEgJfXeSGODYO8fAfrSG3OMkjUAkZScn4IMTrFwPVOLNherk52L2q8%2B1k1IV3G8UqysMovMx%2BQu8s0ALUmvmmFQApKL31SWFegAXNQ%3D",
        "interactions": [
          "SKIP",
          "SEEK",
          "PREVIOUS"
        ],
        "track": {
          "artist": {
            "name": "The Cranberries"
          },
          "name": "Dreams"
        }
      }
    }
  }
}