Run a product action from a profile page
Runs the action behind an action button on a profile page, such as a follow or a request, on behalf of the signed-in viewer. The viewer's subject, not the profile owner's, is forwarded to the product with the action id and its payload.
This is the only authenticated method on the service. It needs a first-party signed-in session holding the profiles:profile:read scope; a token without it, or a delegated product token, is refused with PERMISSION_DENIED. Calls are limited to 10 a minute per viewer (RESOURCE_EXHAUSTED). The profile must be viewable by the caller and the product known, else NOT_FOUND; a product without actions answers UNIMPLEMENTED, and one that fails answers UNAVAILABLE.
The response carries an optional toast message and replace_blocks, which replace blocks on the page that have the same id.
Required scopes: profiles:profile:read
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
The handle of the profile the button is on, without the leading '@'.
^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$The slug of the product that owns the button.
^[a-z][a-z0-9-]{1,15}$The ActionButton's action id, as the block carried it.
^[A-Za-z0-9][A-Za-z0-9_.:-]{0,31}$The ActionButton payload, echoed verbatim.
length <= 256Selector state the page was showing, forwarded to the product.
properties <= 8Response Body
application/json
application/json
curl -X POST "https://profiles-api.xeonr.io/xeonr.profiles.v2.ProfileService/InvokeProfileAction" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"message": "Followed.",
"replaceBlocks": [
"map[id:stats text:map[body:42.6 hours watched in the last 12 months.] title:Activity widgetKey:xmb.stats]"
]
}Get one product's tab on a profile POST
Returns the full page one product shows on a profile, as an ordered list of display blocks. Visibility follows `GetProfile`, and widgets the owner has hidden are absent. `params` carries the selector state the page offers (for example a time window) and is forwarded to the product unchanged. Unknown products and products the person has never used answer `NOT_FOUND`, the same as an unknown handle, so nothing about what exists leaks. A product that is down answers `UNAVAILABLE`. No authentication is required.
Resolve account subjects to public handles POST
Maps Xeonr account subject URNs to profile handles, so a product can render "owned by @handle" links. Takes 1-100 subjects and returns one entry for each that resolves to a public profile. Subjects that are unknown, or whose profile is not public, are left out without an error; the order of the result is not meaningful. No authentication is required.