Reputation: 319
I am currently using 3 Microsoft APIs: Text Analytics Api, Bing Search Api and Linguistic Api. I want to know if there's any Api or method to retrieve remaining quota programmatically for my specific Api against my Api Key?
Other thing I want to know if any Api or any method of these APIs to tell me programmatically if my key is valid or invalid.
Upvotes: 1
Views: 341
Reputation: 196
For the first question, I do not think there is a way to check you remaining quota. If you are concerned about spending beyond your budget, you may be interested into keeping track of the number of calls you do to Microsoft Cognitive Services. In any case, this is the kind of question I suggest you should directly ask to Microsoft Cognitive Services customer services.
For the second question, there is no way to do so. If such way would exist, that would encourage malicious users to find it to generate keys at will. Assuming you have an expired key, the only way to verify its validity is to make a call to any of the Microsoft Cognitive Services APIs and check the error code message, if any.
Upvotes: 1