Documentation contents

VCP 1 Documentation›API Reference

Reactions

Optional like/dislike state for the requesting user, plus optional public counts.

Advertise the reactions keyword in your manifest'scapabilities to mount this route. Writes require thereactions.write scope; reads of public counts don't need an identity, but the per-user reaction field only appears when the request carries one.

Set, change, or clear

PUT/videos/{id}/reaction

reaction is "like", "dislike", ornull to clear. It's idempotent last-write-wins — a plain PUTwith no versioning, safe to retry blindly:

# Like
curl -X PUT "https://api.example.com/vcp/v1/videos/vid_88213/reaction" \
  -H "VCP-Service-Token: vcps_a81f42..." \
  -H "Authorization: Bearer vcpa_71be02..." \
  -H "Content-Type: application/json" \
  -d '{ "reaction": "like" }'

# Clear the reaction
curl -X PUT "https://api.example.com/vcp/v1/videos/vid_88213/reaction" \
  -H "VCP-Service-Token: vcps_a81f42..." \
  -H "Authorization: Bearer vcpa_71be02..." \
  -H "Content-Type: application/json" \
  -d '{ "reaction": null }'
200 OK

{ "reaction": "like", "likes": 1042, "dislikes": 13 }

likes and dislikes are optional — if you don't expose public counts, return only reaction.

Read state

When the capability is present, GET /videos/{id}includes the same fields for the requesting credential:

GET /videos/{id} — additional fields
"reaction": "like",
"likes": 1042,
"dislikes": 13

Note the subject is videos only: the reactions keyword never implies reactions on playlists or collections. A future feature on a different subject would be a different capability with its own convention — seecapability conventions.

Coming soon!

We're putting the finishing touches on VClarity. It'll be on the App Store and Google Play very soon.