PolychartService
Get Layer Subscribe Tokens
Retrieve short-lived realtime subscribe tokens for drawing-layer channels after access validation.
Method
POST
Path
/v1/polychart/layers/subscribe-tokens
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
POST
/v1/polychart/layers/subscribe-tokens Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/polychart/layers/subscribe-tokens' \
--header 'Accept: */*' \
--header 'X-API-KEY-ID: YOUR_API_KEY_ID' \
--header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \
--header 'X-API-SIGNATURE: YOUR_API_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"layers": [
{
"layerId": "1",
"ownerId": "1"
}
]
}'Responses
{
"tokens": [
{
"centrifugoSubToken": "eyJhbGciOiJFZERTQSJ9.centrifugo.signature",
"layer": {
"layerId": "1",
"ownerId": "1"
}
}
]
} layers string[]
Layers for which the caller needs subscribe tokens.
2 fields
2 fields
ownerId string (fixed64)
Account that owns the layer.
Example
1 layerId string (fixed64)
Layer identifier unique within the owner account.
Example
1 centrifugoSubToken string
Short-lived realtime subscribe token for the layer.
Example
eyJhbGciOiJFZERTQSJ9.centrifugo.signature| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |