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
- Convert each requirement into its code equivalent.
Requirement | Code |
---|---|
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.
- Follow the steps to create a signed JWT URL. When creating the JWT payload, add the
search
andrecency
parameters to the requiredresource
andexp
parameters.