Unable to access paid video indexer programmatically
I am trying to utilize the Azure AI Video Indexer programmatically (directly from backend, without any UI or webbrowser).
My use case is:
- From the backend upload a a video and get the json data from video indexer.
I already tried many ways to get the azure video indexer token so that I can upload a upload, however, non of the works. here is the list:
- https://api-portal.videoindexer.ai/api-details#api=Operations&operation=Get-Account-Access-Token-With-PermissionI tried to use this method for the paid account (however, it's written that it's only for trial). Provided my subscription details from here: https://api-portal.videoindexer.ai/profile and it didn't work, also provided the azure subscription id also didn't work.
- second method I tried via creating Managed Application that actually give me the endpoints like /oauth2/v2.0/token and /oauth2/token, I tried "v2-oauth-ropc" method from this list: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth-ropc (I can get the accessToken however, when I try to use that accessToken ad Authroization Bearer to get the azure indexer token, it says.
{
"error": {
"code": "AuthenticationFailed",
"message": "Authentication failed."
}
}
I am trying to follow this api documentation: https://learn.microsoft.com/en-us/rest/api/videoindexer/generate/access-token?view=rest-videoindexer-2025-01-01&tabs=HTTP&tryIt=true&source=docs#code-try-0
In the security section, it says
azure_auth
Azure Active Directory OAuth2 Flow
Type: oauth2 Flow: implicit Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Expand table
NameDescriptionuser_impersonationimpersonate your user accounthowever, this "user_impersonation" never works for me. And remember, it's backend api calls, no browser, or user interaction is there.
Any help full azure team would be highly appreciated.
Best,
Faiz
FYI: Guys, I have tried many solution, please don't just throw the guidance URL here, probably I have tried them already.