Skip to Content
Xeonr Developer Docs
API SpecificationProfiles

Run a product action from a profile page

POST
/xeonr.profiles.v2.ProfileService/InvokeProfileAction

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

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

handle?string

The handle of the profile the button is on, without the leading '@'.

Match^[A-Za-z0-9][A-Za-z0-9._-]{0,31}$
product?string

The slug of the product that owns the button.

Match^[a-z][a-z0-9-]{1,15}$
actionId?string

The ActionButton's action id, as the block carried it.

Match^[A-Za-z0-9][A-Za-z0-9_.:-]{0,31}$
payload?string

The ActionButton payload, echoed verbatim.

Lengthlength <= 256
params?

Selector state the page was showing, forwarded to the product.

Propertiesproperties <= 8
[key: string]?never

Response 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]"
  ]
}