Add a Photo to Favorites

When viewing a photo in Plex you hae the option of adding it to your favorites list. This is done by clicking the heart icon in the play bar when viewing the photo.

If you wish to add many photos to your favorites, you can use a script to loop through your photos and then call this API command to add the photos.

URL

PUT http://{ip_address}:32400/:/rate?key={id}&identifier=com.plexapp.plugins.library&rating=10&X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.
idThe key associated with a photo. This key can be found by calling the Get All Photos API command and using the value of the ratingKey attribute.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.

Response

No response is returned by the command. The status code will indicate whether the clean old bundles task was stopped successfully.

Examples

curl -X PUT http://{ip_address}:32400/:/rate?key={id}&identifier=com.plexapp.plugins.library&rating=10&X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/:/rate?key={id}&identifier=com.plexapp.plugins.library&rating=10&X-Plex-Token={plex_token}
response = requests.put(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/:/rate?key={id}&identifier=com.plexapp.plugins.library&rating=10&X-Plex-Token={plex_token}' -Method 'PUT'
Write-Output $response
Subscribe
Display