Hi Umesh Narayanan,
A 404 error typically indicates that the requested resource was not found. Please verify that you are correctly replacing {location}
and {accountId}
in your URL. The {location}
must match the region where your Azure Video Indexer account is hosted (e.g., trial
, westus2
), and {accountId}
should be your actual Video Indexer account ID.
Your URL should follow this structure: https://api.videoindexer.ai/Auth/westus2/Accounts/your_account_id/AccessToken?allowEdit=true
.
Also, ensure that your account has the appropriate permissions to access the API. You will need to first generate an access token by making a request to this URL using your subscription key in the header. Here's a sample Python snippet for retrieving the token:
import requests
url = "https://api.videoindexer.ai/Auth/{location}/Accounts/{accountId}/AccessToken?allowEdit=true"
headers = {
'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
}
response = requests.get(url, headers=headers)
print(response.text)
Once you obtain the token, you can use it to access video insights by including it as a query parameter in your next API call.
For more information, please refer to the Azure Video Indexer REST API.