Skip to main content
GET
/
livetv
/
dvrs
PlexGO
package main

import(
	"context"
	"github.com/LukeHagar/plexgo"
	"log"
)

func main() {
    ctx := context.Background()

    s := plexgo.New(
        plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    res, err := s.DVRs.ListDVRs(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
{
  "MediaContainer": {
    "MediaContainer": {
      "identifier": "<string>",
      "offset": 123,
      "size": 123,
      "totalSize": 123,
      "status": 123
    },
    "DVR": [
      {
        "Device": [
          {
            "ChannelMapping": [
              {
                "channelKey": "<string>",
                "deviceIdentifier": "<string>",
                "enabled": "<string>",
                "lineupIdentifier": "<string>"
              }
            ],
            "key": "<string>",
            "lastSeenAt": 123,
            "make": "<string>",
            "model": "<string>",
            "modelNumber": "<string>",
            "protocol": "<string>",
            "sources": "<string>",
            "state": "<string>",
            "status": "<string>",
            "tuners": "<string>",
            "uri": "<string>",
            "uuid": "<string>"
          }
        ],
        "key": "<string>",
        "language": "<string>",
        "lineup": "<string>",
        "uuid": "<string>"
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

The token which identifies the user accessing the PMS. This can be either:

  • A traditional access token obtained from plex.tv
  • A JWT token obtained through the JWT authentication flow

JWT tokens provide better security with:

  • Short-lived tokens (7 days expiration)
  • Public-key cryptography (ED25519)
  • Better clock synchronization
  • Individual device revocation capability

Response

200 - application/json

OK

MediaContainer
object