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.


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

Feedback and Knowledge Base