# Migration guide — Migrate an API key integration to a private app

**URL:** <https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [July 15, 2022, 11:27pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091 "2022-07-15T23:27:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 15, 2022, 11:27pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/1 "2022-07-15T23:27:40Z")

</div>

Hey, HubSpot Developers! There are plenty of questions about the upcoming sunset and how to migrate your apps using API keys to use Private Apps.

Luckily, our amazing team put together this guide, [Migrate an API key integration to a private app](https://developers.hubspot.com/docs/api/migrate-an-api-key-integration-to-a-private-app) ✅

Changelog information here — [Upcoming: API Key Sunset](https://developers.hubspot.com/changelog/upcoming-api-key-sunset)

If you have questions about the guide or the information included, please leave your feedback in the comments. If you have specific questions about migration of your app, please consider starting a new thread. This will help make sure your request gets the attention it deserves from our community.

Have fun coding! — Jaycee 🧡

---

<div class="post-metadata">

**Author:** ![MWeddup](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@MWeddup](https://community.hubspot.com/u/MWeddup)\
**Post date:** [July 26, 2022, 3:54pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/2 "2022-07-26T15:54:36Z")

</div>

I’ve been attempting to migrate from API KEY auth to Private App using the guide, but the scopes on the Private App were causing difficulty, the e-commerce scope had been added to the Private App ( and the key rotated ) but the calls to the API using the Private App are still giving “One or more of the following scopes are required.” requiredScopes":[“e-commerce”] turned out to be attempting to use the e-commerce on the Products on a non-enterprise/non-professional account, would be handy if the guide had a reminder or the api message was more specific

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 27, 2022, 7:53pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/3 "2022-07-27T19:53:13Z")

</div>

Thanks for your feedback, @MWeddup 🙌 I’ll pass it along to my team. — Jaycee

---

<div class="post-metadata">

**Author:** ![Agilx](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@Agilx](https://community.hubspot.com/u/Agilx)\
**Post date:** [October 14, 2022, 3:20pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/4 "2022-10-14T15:20:53Z")

</div>

Any update on this? I’m getting the same error using a developer account that was just renewed. Created a Private APP with the e-commerce scope and I can’t create Projects.

---

<div class="post-metadata">

**Author:** ![Agilx](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@Agilx](https://community.hubspot.com/u/Agilx)\
**Post date:** [October 14, 2022, 3:25pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/5 "2022-10-14T15:25:12Z")

</div>

Sorry I just noticed this detail " turned out to be attempting to use the e-commerce on the Products on a non-enterprise/non-professional account," Can we not create projects through the API if we are using a free developer account? What is the minimum we need to properly test? Do we need to pay for 2 accounts? One for production data and one for testing?

---

<div class="post-metadata">

**Author:** ![GDell](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@GDell](https://community.hubspot.com/u/GDell)\
**Post date:** [July 28, 2022, 1:29pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/6 "2022-07-28T13:29:22Z")

</div>

Hi, we’ve moved to the new method, but we can’t get the Blog Author Name and Blog Author Image and these aren’t mentioned in the documentation. Can you advise?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 29, 2022, 4:02pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/7 "2022-07-29T16:02:19Z")

</div>

Hey, @GDell 👋 Which endpoint are you referring to? I am happy to take a brief look.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![GDell](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@GDell](https://community.hubspot.com/u/GDell)\
**Post date:** [July 29, 2022, 4:19pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/8 "2022-07-29T16:19:07Z")

</div>

[https://api.hubapi.com/blogs/v3/blog-authors/](https://api.hubapi.com/blogs/v3/blog-authors/)

It’s this one. Just need the equivalent for both Blog Author Name and associated image.

The new API is returning the user who created the post rather than the user the post is assigned to

---

<div class="post-metadata">

**Author:** ![GDell](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@GDell](https://community.hubspot.com/u/GDell)\
**Post date:** [August 1, 2022, 1:21pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/9 "2022-08-01T13:21:21Z")

</div>

Just more info:

We are using the Blog endpoints here [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/cms/blog-post), see Endpoints tab. The “authorName”: “string” seems to return the name of the user creating the post, rather than the Author assigned to it. And there is no endpoint for Author image in this list. Hope this helps.

---

<div class="post-metadata">

**Author:** ![GustavoOliveira](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@GustavoOliveira](https://community.hubspot.com/u/GustavoOliveira)\
**Post date:** [July 28, 2022, 9:29pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/10 "2022-07-28T21:29:04Z")

</div>

Hi, we are preparing to move to the new method. On the Article Guide it directs to the V3 API Enpoints.  
My question is, on the required method, Private Apps, is the only possible API available for the new method the V3 API?

One of the features only possible in the V1 API is the Property History, and we wanted to keep this feature after the change.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [July 29, 2022, 4:00pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/11 "2022-07-29T16:00:34Z")

</div>

Hey, @GustavoOliveira 👋 I am happy to check for us.

Can you tell me specifically which v1 API you are referring to? For example, the [**Get a contact by vid**](https://legacydocs.hubspot.com/docs/methods/contacts/get_contact) endpoint works with private apps.

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![GustavoOliveira](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@GustavoOliveira](https://community.hubspot.com/u/GustavoOliveira)\
**Post date:** [August 1, 2022, 4:16pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/12 "2022-08-01T16:16:26Z")

</div>

Thanks!

It’s the [Get all deals (hubspot.com)](https://legacydocs.hubspot.com/docs/methods/deals/get-all-deals) or [Get a deal | Deals API (hubspot.com)](https://legacydocs.hubspot.com/docs/methods/deals/get_deal) enpoints. But specifcally the parameters to get all version of a property (“Properties with History” and “Include property versions”, respectively), which is something the newer APIs don’t seem to provide.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 1, 2022, 10:11pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/13 "2022-08-01T22:11:07Z")

</div>

Hey, @GustavoOliveira 👋 Thank you very much for clarifying. I successfully ran quick tests of both v1 endpoints using Postman and included the additional params:

[**Get all deals**](https://legacydocs.hubspot.com/docs/methods/deals/get-all-deals)

- Endpoint`GET https://api.hubapi.com/deals/v1/deal/paged?propertiesWithHistory=dealname​`

- Response (edited to only include the relevant Deal)

[**Get a deal**](https://legacydocs.hubspot.com/docs/methods/deals/get_deal)

- Endpoint`GET https://api.hubapi.com/deals/v1/deal/9669508372?includePropertyVersions=true​`

- Response (edited to include only the relevant deal property)

Thank you for asking this question. It helps other community members as well as helping us identify areas where more clarity is needed.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 1, 2022, 10:12pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/14 "2022-08-01T22:12:17Z")

</div>

I forgot the most important detail 🙃 Both of these requests were made using a Private App I created in my app testing account. — Jaycee

---

<div class="post-metadata">

**Author:** ![GustavoOliveira](https://avatars.discourse-cdn.com/v4/letter/g/919ad9/32.png) [@GustavoOliveira](https://community.hubspot.com/u/GustavoOliveira)\
**Post date:** [August 2, 2022, 1:22pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/15 "2022-08-02T13:22:11Z")

</div>

Thank you so much for the answer, it’s really thorough.

Now it’s clear that I can make this change.

---

<div class="post-metadata">

**Author:** ![habibasharma](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/habibasharma/32/198449_2.png) [@habibasharma](https://community.hubspot.com/u/habibasharma)\
**Post date:** [December 25, 2023, 6:16pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/16 "2023-12-25T18:16:24Z")

</div>

How can i use this for my project [www.emiratesevisaonline.com](http://www.emiratesevisaonline.com)

---

<div class="post-metadata">

**Author:** ![JOrtuno](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@JOrtuno](https://community.hubspot.com/u/JOrtuno)\
**Post date:** [August 2, 2022, 9:32am UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/17 "2022-08-02T09:32:49Z")

</div>

Hi HubSpot Developers 🙂,

I have a similar problem as others when using a method from the V1 version:

[https://api.hubapi.com/integrations/v1/limit/daily](https://api.hubapi.com/integrations/v1/limit/daily)

Even though the Private App that we created was allowing the access to every scope.

The message error is the following: “The scope needed for this API call isn’t available for public use. If you have questions, contact support or post in our developer forum.”

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![NHalim](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@NHalim](https://community.hubspot.com/u/NHalim)\
**Post date:** [August 5, 2022, 4:06am UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/18 "2022-08-05T04:06:25Z")

</div>

Hi,

Can the access token of Private App be rotated by manual interaction only?

Does it have refresh token to regenerate token?

Many thanks!

---

<div class="post-metadata">

**Author:** ![JOConnell2](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JOConnell2](https://community.hubspot.com/u/JOConnell2)\
**Post date:** [September 17, 2022, 2:01am UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/19 "2022-09-17T02:01:39Z")

</div>

Hi,

I have migrated our serverless functions over to using a private app by including the Authorisation header and have updated the Hubspot Client Library calls to include the access token of the new private app.

What i don’t know how to do is change the call made by HubL functions within our HTML, for example:

{% set contacts = crm\_associations(propertyID, “USER\_DEFINED”, ASSOCIATION\_TYPE\_CONTACT\_TO\_COMAPNY, “”,“phone,firstname,lastname,email,ownership\_status,customer\_services\_owner”) %}

When I check the logs I see traffic coming in using the old API key, where is the authorisastion for this function set?

Regards,

Jordan

---

<div class="post-metadata">

**Author:** ![JOConnell2](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@JOConnell2](https://community.hubspot.com/u/JOConnell2)\
**Post date:** [September 17, 2022, 10:36pm UTC](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091/20 "2022-09-17T22:36:04Z")

</div>

How do HubL calls authenticate? I have changed our severless functions to use the authorisation header with the access code from our private app and i have changed our calls that use the client libraries to use the access code also.

I cannot find out how to change the authorization method of my HubL calls present in our dynamic pages. I can see from the API logs that the HubL calls continue to use the old API key.

[Next page](https://community.hubspot.com/t/migration-guide-migrate-an-api-key-integration-to-a-private-app/61091.md?page=2)
