-
Notifications
You must be signed in to change notification settings - Fork 0
API:Authentication
Authentication is handled by the MediaButler Auth Service, each client will perform the Plex authentication locally to obtain a Plex Token. The Plex Token is then handed to the MediaButler Auth Service to compute tokens that are compatible with the MediaButler Service. Each request to the MediaButler Server will use the information contained within the token to authenticate the user to your Plex Server allowing you control.
Note: The MediaButler Auth Service does provide methods that accepts a username and password. While we don't store the information sent to these methods we still DO NOT recommend using these methods.
First of all you need a Client Identifier, which you can obtain by visiting the MediaButler Auth Service but for this purpose, we will use the id 4d656446-fbe7-4545-b754-1adfb8eb554e
Request:
curl --location --request POST "https://auth.mediabutler.io/login" \
--header "MB-Client-Identifier: 4d656446-fbe7-4545-b754-1adfb8eb554e" \
--header "Content-Type: application/json" \
--data "{ \"authToken\": \"PLEX_AUTH_TOKEN\" }"
Replace PLEX_AUTH_TOKEN with a Plex Token.
Response:
{
"username": "PlexUser",
"email": "plexuser@example.com",
"thumb": "https://plex.tv/users/deletedForExample/avatar?c=deletedForExample",
"servers": [
{
"name": "Server",
"machineId": "removedForExample",
"url": "removedForExample",
"owner": true,
"token": "signedJWTToken"
}
]
}