The way to get api key

Dmytro Dronov 0 Reputation points
2023-04-25T13:47:09.5466667+00:00

I'm having trouble getting an api key.
No, everything is OK if you follow this tutorial https://learn.microsoft.com/en-us/azure/azure-video-indexer/video-indexer-use-apis#subscribe-to-the-api
but I need to get this api key programmatically in my pipeline. Is there some way to extract the api key using CLI or some kind of sdk, maybe a workeround?
If there is no such way, then other developers may agree with me that it is worth implementing. P.S. I am aware of similar questions like this one: https://learn.microsoft.com/en-us/answers/questions/855740/how-can-i-access-api-key-of-the-video-indexer But this does not suit me, I do not want to receive an access token, I want an api key

Azure AI Video Indexer
Azure AI Video Indexer
An Azure video analytics service that uses AI to extract actionable insights from stored videos.
83 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Itai Norman 21 Reputation points Microsoft Employee
    2023-05-03T08:17:20.8+00:00

    Hi @Dmytro Dronov ,

    Did you see the code sample add the bottom of the article?
    The best practice is to store the API key in a key vault and get the API key using the key vault commands.

    Other option is to save it as a variable in your code. For the first you will need to manually retrieve it from the API portal.

    However, this is regrading to our classic account. The preferred way is to use ARM-based account, using ARM based account will resolve the use of API key. the auth will be in two steps:
    az login
    get access token
    Code sample

    Itai

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.