---
title: "Migrating Legacy API Key to Service API Key"
canonical: "https://docs.infoblox.com/space/BloxOneCloud/35430928/Migrating%20Legacy%20API%20Key%20to%20Service%20API%20Key"
format: markdown
---
<span style="color: #000000">Infoblox will deprecate legacy API keys in the near future. We recommend that you start migrating your current legacy API keys to service API keys to avoid authentication issues in your current API scripts or processes.</span>

> ⚠️ **Note**
> ⚠️ 
> ⚠️ <span style="color: #000000">You must be a user with the </span>**<span style="color: #000000">User Manage</span>**<span style="color: #000000"> permission or an </span>**<span style="color: #000000">All Access Admin</span>**<span style="color: #000000"> to be able to migrate legacy API keys.</span>

<span style="color: #000000">To migrate your legacy API keys to services API keys, complete the following:</span>

1. <span style="color: #000000">Log in to the SSO Portal as a user with the </span>**<span style="color: #000000">User Manage</span>**<span style="color: #000000"> permission or as an all access admin.</span>
2. <span style="color: #000000">Create a service user, as described in </span>[*<span style="color: #000000">Creating New Portal Admins</span>*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35367290)<span style="color: #000000">.</span>
3. <span style="color: #000000">Create a service API key and associate it with the service account user you just created, as described in </span>[*<span style="color: #000000">Creating Service API Key</span>*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35464104)<span style="color: #000000">.</span>
4. <span style="color: #000000">Repeat the previous steps if you need to create multiple service API keys.</span>
5. <span style="color: #000000">Go to the </span>*<span style="color: #000000">Service API Keys</span>*<span style="color: #000000"> page on the SSO Portal and review the </span>**<span style="color: #000000">Last Used At</span>**<span style="color: #000000"> field to determine which legacy API keys you want to replace with the newly created service API keys. For information, see </span>[*<span style="color: #000000">Configuring Service API Key</span>*](https://infoblox-docs.atlassian.net/wiki/spaces/BloxOneCloud/pages/35430173)<span style="color: #000000">.</span>
6. <span style="color: #000000">Change your current API scripts or processes to use the newly created key(s) you just created.</span>
7. <span style="color: #000000">Disable the legacy API keys that have not been used. You can then delete these legacy API keys at a later date.</span>

<span style="color: #000000">You can also create an automated mechanism to rotate your API keys by replacing old keys with new ones.</span>

<span style="color: #000000">To create an automated process for rotating your API keys, complete the following:</span>

1. <span style="color: #000000">Create an API script to create a new a service API key by using an existing legacy API key.</span>
2. <span style="color: #000000">Use the newly created service API key in an API script to stop using the legacy API key.</span>
3. <span style="color: #000000">Use the newly created service API key to disable and delete the legacy API key.</span>

<span style="color: #000000">For more details, see the following video:</span>

[<span style="color: #000000">Migrating Legacy API Keys</span>](https://youtu.be/FetLLX3q9j4?si=Xl0dWCuyOkhJf7BW)