using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Server.GetMyPlexAccountAsync();
// handle response
{
"MyPlex": {
"authToken": "Z5v-PrNASDFpsaCi3CPK7",
"username": "example.email@mail.com",
"mappingState": "mapped",
"mappingError": "<string>",
"signInState": "ok",
"publicAddress": "140.20.68.140",
"publicPort": 32400,
"privateAddress": "10.10.10.47",
"privatePort": 32400,
"subscriptionFeatures": "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks",
"subscriptionActive": true,
"subscriptionState": "Active"
}
}
Returns MyPlex Account Information
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");
var res = await sdk.Server.GetMyPlexAccountAsync();
// handle response
{
"MyPlex": {
"authToken": "Z5v-PrNASDFpsaCi3CPK7",
"username": "example.email@mail.com",
"mappingState": "mapped",
"mappingError": "<string>",
"signInState": "ok",
"publicAddress": "140.20.68.140",
"publicPort": 32400,
"privateAddress": "10.10.10.47",
"privatePort": 32400,
"subscriptionFeatures": "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks",
"subscriptionActive": true,
"subscriptionState": "Active"
}
}
Plex Authentication Token
MyPlex Account
The response is of type object
.