Plex
(Plex)
Overview
API Calls that perform operations directly against https://Plex.tv
Available Operations
GetCompanionsData
Get Companions Data
Example Usage
Parameters
| Parameter |
Type |
Required |
Description |
serverURL |
string |
➖ |
An optional server URL to use. |
Response
GetCompanionsDataResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetCompanionsDataBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetCompanionsDataUnauthorized |
401 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetUserFriends
Get friends of provided auth token.
Example Usage
Parameters
| Parameter |
Type |
Required |
Description |
serverURL |
string |
➖ |
An optional server URL to use. |
Response
GetUserFriendsResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUserFriendsBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetUserFriendsUnauthorized |
401 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetGeoData
Returns the geolocation and locale data of the caller
Example Usage
Parameters
| Parameter |
Type |
Required |
Description |
serverURL |
string |
➖ |
An optional server URL to use. |
Response
GetGeoDataResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGeoDataBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetGeoDataUnauthorized |
401 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetHomeData
Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status.
Example Usage
Response
GetHomeDataResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetHomeDataBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetHomeDataUnauthorized |
401 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetServerResources
Get Plex server access tokens and server connections
Example Usage
Parameters
Response
GetServerResourcesResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerResourcesBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetServerResourcesUnauthorized |
401 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetPin
Retrieve a Pin ID from Plex.tv to use for authentication flows
Example Usage
Parameters
| Parameter |
Type |
Required |
Description |
request |
GetPinRequest |
✔️ |
The request object to use for the request. |
serverURL |
string |
➖ |
An optional server URL to use. |
Response
GetPinResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetPinBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |
GetTokenByPinId
Retrieve an Access Token from Plex.tv after the Pin has been authenticated
Example Usage
Parameters
| Parameter |
Type |
Required |
Description |
request |
GetTokenByPinIdRequest |
✔️ |
The request object to use for the request. |
serverURL |
string |
➖ |
An optional server URL to use. |
Response
GetTokenByPinIdResponse
Errors
| Error Type |
Status Code |
Content Type |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenByPinIdBadRequest |
400 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTokenByPinIdResponseBody |
404 |
application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException |
4XX, 5XX |
*/* |