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

Feedback and Knowledge Base