FAQ: How can I create a search playlist with JWT-protected content?

Answer. Add the additional parameters to the JWT payload.

When creating a search playlist with content that is protected with JWT URL signing, you must include all parameters -- including the search query -- within the payload prior to generating the token.


Example scenario

Assume you have following requirements:

  • Use the /v2/playlists/{playlist_id} playlist.
  • Filter the video results by term: moose.
  • Restrict video results to the last 7 days.

Coding the solution

  1. Convert each requirement into its code equivalent.
RequirementCode
Use the /v2/playlists/{playlist_id} playlist."resource": "/v2/playlists/{PLAYLIST_ID}"
Filter the video results by term: moose."search": "moose"*
Restrict video results to the last 7 days."recency": "7D"*

* You can use any of the path parameters for the /v2/playlists route to refine your results.


  1. Follow the steps to create a signed JWT URL. When creating the JWT payload, add the search and recency parameters to the required resource and exp parameters.


Did this page help you?