Generate - Extension Restricted Viewer Access Token
Generate an Azure Video Indexer restricted viewer access token.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VideoIndexer/accounts/{accountName}/generateExtensionRestrictedViewerAccessToken?api-version=2025-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[A-Za-z0-9-]+$ |
The name of the Azure Video Indexer account. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
extensionId | True |
string |
The extension's resource ID |
scope | True |
The requested media type |
|
tokenLifetimeInSeconds |
integer (int32) |
Lifetime of the access token (in seconds). Default value: 3600 (1 hour), Max value: 43200 (12 hours). Setting this value is enabled for tokens in 'Video' scope. |
|
videoId |
string |
The video ID |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The Azure Video Indexer account's access token properties were retrieved successfully. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Generate restricted viewer access |
Generate restricted viewer access |
Generate restricted viewer accessToken for account
Sample request
POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-azurevideoindexer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-azurevideoindexer/generateExtensionRestrictedViewerAccessToken?api-version=2025-04-01
{
"scope": "Account",
"extensionId": "/subscriptions/39ks012-8546-4da5-g6w0-8c3cb76dd930/resourceGroups/yl-arc/providers/Microsoft.Kubernetes/ConnectedClusters/yl-arc/providers/Microsoft.KubernetesConfiguration/extensions/exampleid"
}
Sample response
{
"accessToken": "<jwt token of 1260 characters length>"
}
Generate restricted viewer accessToken for video #1
Sample request
POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-azurevideoindexer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-azurevideoindexer/generateExtensionRestrictedViewerAccessToken?api-version=2025-04-01
{
"scope": "Video",
"videoId": "07ec9e38d4",
"extensionId": "/subscriptions/39ks012-8546-4da5-g6w0-8c3cb76dd930/resourceGroups/yl-arc/providers/Microsoft.Kubernetes/ConnectedClusters/yl-arc/providers/Microsoft.KubernetesConfiguration/extensions/exampleid",
"tokenLifetimeInSeconds": 3600
}
Sample response
{
"accessToken": "<jwt token of 1260 characters length>"
}
Definitions
Name | Description |
---|---|
Access |
Azure Video Indexer access token. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Generate |
Restricted viewer access token generation request's parameters |
scope |
The requested media type |
AccessToken
Azure Video Indexer access token.
Name | Type | Description |
---|---|---|
accessToken |
string |
The access token. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
GenerateExtensionRestrictedViewerAccessTokenParameters
Restricted viewer access token generation request's parameters
Name | Type | Description |
---|---|---|
extensionId |
string |
The extension's resource ID |
scope |
The requested media type |
|
tokenLifetimeInSeconds |
integer (int32) |
Lifetime of the access token (in seconds). Default value: 3600 (1 hour), Max value: 43200 (12 hours). Setting this value is enabled for tokens in 'Video' scope. |
videoId |
string |
The video ID |
scope
The requested media type
Value | Description |
---|---|
Video | |
Account | |
Project |