Plex.tv - Change Opt-Out Settings

This API request will allow a user to change what settings they will opt-out of for in Plex. Each user will need to set this using their own Plex token.

URL

POST https://plex.tv/api/v2/user/{uuid}/settings/opt_outs?key={opt_out_key}&value={opt_out_value}&X-Plex-Token={plex_token}

Parameters

NameDescription
plex_tokenThe Plex user token.
uuidThe UUID associated to the user. This value can be obtained by making a request to the Plex.tv - Get Users endpoint and using the uuid value for the user.
opt_out_keyThe key for the opt out setting. See Remarks for more information on the valid keys.
opt_out_valueThe opt-out value. See Remarks for more information on the valid values.

Return Status

HTTP CodeDescription
200Success - The request was successful.
400Bad request. A parameter value was invalid.
401Unauthorized - The Plex token provided was not valid.

Response

An XML string value is returned that lists the opt-out setting being changed and the new value.

An example of the XML response is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<optOuts type="array">
  <optOut key="includeSocialProof" value="opt_out"/>
</optOuts>

Remarks

There are several opt-out settings that can be changed with this API endpoint. The values that can be used is dependent on the key that is being changed.

Each value of each setting can be at least two of the values from the following table:

Opt-out Settings Values
ValueDescription
opt_inEnabled
opt_outDisabled
opt_out_managedDisabled for Managed Accounts

the table below lists the opt-out keys for the settings along with their valid values.

Opt-out Settings and Values
KeyValid ValuesDescription
includeAvailabilitiesopt_in, opt_out, opt_out_managedDisplay availabilities from other streaming services on detail pages.
includeDiscoverSourceopt_out, opt_out_managedDiscover source.
includeMetadataInSearchopt_out, opt_out_managedDisplay "More Ways to Watch" search results.
includeSocialProofopt_in, opt_outDisplay activity from my friends on detail pages.
tv.plex.provider.epgopt_in, opt_out, opt_out_managedLive TV from online media sources.
tv.plex.provider.vodopt_in, opt_out, opt_out_managedMovies & shows from online media sources.

There are additional opt-out settings, but some are no longer in use, so changing those settings may not have any effect.

Also, if an opt-out setting is misspelled, it will actually add that misspelled setting instead of producing an error. At this time, doing so doesn't seem to have an impact on Plex.

Incorrect value

If an incorrect value is provided for an opt-out key, then a 400 Bad Request status code. The following XML response is also returned:

<?xml version="1.0" encoding="UTF-8"?>
<errors>
    <error code="1004" message="value does not have a valid value" status="400"/>
</errors>

Examples

curl -X POST https://plex.tv/api/v2/user/{uuid}/settings/opt_outs?key={opt_out_key}&value={opt_out_value}&X-Plex-Token={plex_token}
import requests
plex_url = https://plex.tv/api/v2/user/{uuid}/settings/opt_outs?key={opt_out_key}&value={opt_out_value}&X-Plex-Token={plex_token}

response = requests.post(plex_url)

print(response.text)
$response = Invoke-RestMethod "https://plex.tv/api/v2/user/{uuid}/settings/opt_outs?key={opt_out_key}&value={opt_out_value}&X-Plex-Token={plex_token}" -Method POST

Write-Output $response
Subscribe
Display