su Greetings & Welcome to Microsoft Q&A forum!
When I attempted to execute using the endpoint and API key in Azure OpenAI, according to the error message, it appears that the access token I am using has expired.The error message "ExpiredAuthenticationToken" indicating that your access token has expired when attempting to execute operations at the OpenAI endpoint, you will need to obtain a new access token to continue using the service.
You can find the Keys in the Azure portal. The Endpoint and Keys can be found in the Resource Management section. Copy your endpoint and access key as you'll need both for authenticating your API calls. You can use either KEY1 or KEY2. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
It's also important to note that access tokens have a limited lifespan and will expire after a certain period of time. To avoid running out of access tokens, you can implement a token refresh mechanism in your application or script that automatically obtains a new access token when the current token is about to expire. This can help ensure that your application or script can continue to access the OpenAI endpoint without interruption.
How can I execute operations at the OpenAI endpoint without running out of access tokens?
To avoid running out of access tokens when using the OpenAI endpoint in Azure, you can use Azure Key Vault to securely store and manage your access tokens.
For more details, please refer Customer-managed keys with Azure Key Vault
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.