API - Translator Text / Speech: Why are there two keys for my API subscription?

Only one key is needed at a time. You are getting two keys so that you can expire a key without having any system downtime. For example, you want to replace your primary key. The procedure is:

  1. Configure your service or application to use the secondary key.
  2. Deploy or ship it to your customers.
  3. Regenerate the primary key
  4. (Optional) reconfigure your service to use the new primary key

If there was only one key at a time, your service would be down while you did the key replacement.

Good practice is to replace your keys on a regular basis (every 6 months or whatever is appropriate based on the sensitivity of your data). You should also replace keys when anyone who has access to the keys leaves your business or team. Finally, you should obviously replace them if you believe they have been compromised in some way, or accidentally written to a log or posted to a public GitHub repo.

Both the primary and secondary keys can be regenerated in the Azure portal. Select your subscription, and then the Keys pane. There are two buttons at the top of the keys pane, to renew either one of the keys. Be careful not to renew the key for your currently deployed app or service - there is no way to get your old key back once you renewed it. There is also no option to move the same key from one Azure account to a different one.

Thanks to Mike Goodwin for elegantly answering a similar question on Stack Overflow.

Translator

  1. Announcement: Changes to the Collaborative Translation functions
  2. Microsoft Translator Moves to the Azure portal
  3. API - Translator Data Centers
  4. API and Hub: Confidentiality
  5. API - Translator Speech: Microsoft Translator Speech API references
  6. API - Translator Text: How to report an issue with the API
  7. API - Translator Text / Speech: Microsoft Translator with IP filtered firewalls
  8. API - Translator Text / Speech: Get a report of your consumption
  9. API - Translator Text / Speech: Using the API key directly in the call. No more token.
  10. API - Translator Text / Speech: Why are there two keys for my API subscription?
  11. API - Translator Text: Hybrid Neural Machine Translation
  12. API - Translator Text: Using Neural MT Systems
  13. API- Translator Text: Standard category languages
  14. API - Translator Text: My CAT tool isn't working and is asking for the Client ID and Client Secret
  15. API - Translator Text: Limits
  16. API - Translator Text: How Microsoft Translator counts characters
  17. API - Translator Text: Gender selection in the Speak() method
  18. API - Translator Text: Trados plugin for Microsoft Translator
  19. API - Translator Text: Java- Using SSL with the Microsoft Translator API
  20. API - Translator Text: European datacenter
  21. API - Translator Text: Languages detected by the Detect() method
  22. API - Translator Text: First few Microsoft Translator API requests succeed, then the calls fail
  23. API - Translator Text: Profanity filtering in the TranslateArray() method
  24. Hub: API available
  25. Hub: Translator Hub Resource Guide
  26. Hub: August 2016 Release notes
  27. Hub: Deployment of a custom system requires a Microsoft Translator Text API subscription in the Azure portal
  28. Hub: Capacity of custom Microsoft Translator Hub systems
  29. Hub: Building a custom system using a dictionary only
  30. Business Applications: Security and Privacy in Microsoft Office Products

Feedback and Knowledge Base