Hello @Faiz ul Haque ,
I was in contact with Azure support myself about a different topic some time ago, and during that time, I too encountered the same issue as you describe. I was unable to use the Primary and Secondary Keys for my paid account, as those keys were linked only to my Trial account.
To summarize; if you have an ARM account rather than a Trial or Classic account, the procedure is somewhat different, and you can't use the info provided under https://api-portal.videoindexer.ai/profile. Here is the response I got from one support engineer at Microsoft Azure Media and Communication Services:
"In the context of a Video Indexer ARM Account, to use the Video Indexer API, the workflow is different from how you would use a Trial account or a Classic account and does not involve using Subscription Keys.
While for Trial or Classic accounts, the access token could be generated using the API Portal: https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Account-Access-Token and required using Subscription Keys, for a Video Indexer ARM account, the procedure is different.
To obtain the Account Access Token for ARM accounts, there are 2 options:
- Option 1: From inside the Azure Portal:
- You need to go to your Azure AI Video Indexer Account
- Go to the Management API blade
- Choose the permissions and the scope
- Option 2: Using the REST API:
{
permissionType: "Contributor",
scope: "Account"
}
- Click Run - action which will generate the access token
Once you've generated the Account Access Token using one of the methods shared above, you can then go to the Video Indexer API Portal and run your required API requests using the previously-generated Account Access Token.
For example, to run the List Videos API:
- Follow this link: https://api-portal.videoindexer.ai/api-details#api=Operations&operation=List-Videos
- Complete the location, accountId and accessToken fields
- Leave the Subscription Key field of the Authorization Header empty
- As for the Ocp-Apim-Subscription-Key field, even though it does not influence the request in any way for a VI ARM Account, it is a required field in the portal, so, you can add any random value to it. Since your VI Account is ARM-based and you've already completed the accessToken field, the value inside the Ocp-Apim-Subscription-Key field will be ignored. (for example, while testing this functionality, I have added the "-" character to the field).
- Run the request."
To conclude; Even if the above is referring mainly to the use of the API web UI, you might get some insights from it, to use it programmatically as well as you want.
Hope you find this helpful. Thanks.