Read Token
GEThttps://api.millicast.com/api/subscribe_token/:tokenId
Gets token specified by token id.
Request
Path Parameters
tokenId integerrequired
Responses
- 200
- 400
- default
Success
- application/json
- Schema
- Example (auto)
- simple
- regex
- expiring
Schema
statusstringrequired
Possible values: non-empty
Default value:
success
data objectrequired
{
"status": "success",
"data": {
"tracking": {
"trackingId": "string"
},
"adminSettings": {
"forcedServerId": "string",
"dumpStats": true
},
"id": 0,
"label": "string",
"token": "string",
"addedOn": "2024-07-29T15:51:28.071Z",
"expiresOn": "2024-07-29T15:51:28.071Z",
"isActive": true,
"streams": [
{
"streamName": "string",
"isRegex": true
}
],
"allowedOrigins": [
"string"
],
"allowedIpAddresses": [
"string"
],
"bindIpsOnUsage": 0,
"originCluster": "string",
"effectiveSettings": {
"originCluster": "string",
"allowedCountries": [
"string"
],
"deniedCountries": [
"string"
],
"geoCascade": {
"isEnabled": true,
"clusters": [
"string"
]
}
},
"allowedCountries": [
"string"
],
"deniedCountries": [
"string"
]
}
}
simple
{
"status": "success",
"data": {
"allowedCountries": [],
"deniedCountries": [],
"name": "new_label_name",
"id": 75248,
"label": "label_no_586",
"token": "my-magic-token-82",
"addedOn": "2024-12-03T02:43:50Z",
"isActive": true,
"streams": [
{
"streamName": "master_stream",
"isRegex": false
},
{
"streamName": "stream1",
"isRegex": false
}
],
"allowedOrigins": [],
"allowedIpAddresses": [],
"originCluster": "",
"effectiveSettings": {
"originCluster": "auto",
"allowedCountries": [],
"deniedCountries": []
}
}
}
regex
{
"status": "success",
"data": {
"allowedCountries": [],
"deniedCountries": [],
"name": "new_regex_token_name",
"id": 69050,
"label": "label_no_254",
"token": "my-magic-token-57",
"addedOn": "2024-12-03T00:53:13Z",
"isActive": true,
"streams": [
{
"streamName": "Cooked or Cooking??",
"isRegex": false
},
{
"streamName": "newStream1",
"isRegex": false
},
{
"streamName": "special_regex_stream[0-9]+",
"isRegex": true
}
],
"allowedOrigins": [],
"allowedIpAddresses": [],
"originCluster": "",
"effectiveSettings": {
"originCluster": "auto",
"allowedCountries": [],
"deniedCountries": []
}
}
}
expiring
{
"status": "success",
"data": {
"allowedCountries": [],
"deniedCountries": [],
"name": "token that expires",
"id": 74061,
"label": "label_no_649",
"token": "my-magic-token-17",
"addedOn": "2024-12-03T05:14:33Z",
"expiresOn": "2024-12-10T05:14:21Z",
"isActive": true,
"streams": [
{
"streamName": "temp stream",
"isRegex": false
}
],
"allowedOrigins": [],
"allowedIpAddresses": [],
"originCluster": "",
"effectiveSettings": {
"originCluster": "auto",
"allowedCountries": [],
"deniedCountries": []
}
}
}
Bad Request
- application/json
- Schema
- Example (auto)
- does not exist
Schema
statusstringrequired
Possible values: non-empty
Default value:
fail
datarequired
{
"status": "fail",
"data": {}
}
does not exist
{
"status": "fail",
"data": {
"tokenId": "No publish token with id: 99"
}
}
Server Error
- application/json
- Schema
- Example (auto)
- general
Schema
statusstringrequired
Possible values: non-empty
Default value:
error
messagestringrequired
Possible values: non-empty
codeint32nullable
datanullable
{
"status": "error",
"message": "string",
"code": 0
}
general
{
"status": "error",
"message": "simple error reason",
"code": 500,
"data": {
"additional": "other data here (not actual key)"
}
}
Authorization: http
name: API_Secrettype: httpdescription: ### Usage #### Acquire secret from dashboard. * Login to the streaming dashboard * On the left menu, click on Settings * Navigate to the Security tab's sub section API Secrets 1. "+ Create" to generate a new named API Secret if needed 2. Click on the copy button or the reveal button to access a previously created API Secret scheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://docs.optiview.dolby.com/api/subscribe_token/:tokenId");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());