# How to get new token

**URL:** <https://community.hubspot.com/t/how-to-get-new-token/96210>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [December 15, 2023, 4:26pm UTC](https://community.hubspot.com/t/how-to-get-new-token/96210 "2023-12-15T16:26:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LClark0](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@LClark0](https://community.hubspot.com/u/LClark0)\
**Post date:** [December 15, 2023, 4:26pm UTC](https://community.hubspot.com/t/how-to-get-new-token/96210/1 "2023-12-15T16:26:38Z")

</div>

I’ve recently started a new job and am modifying an app that uses an apitoken. The issue is the old token has expired and with the currrent one I get the “INVALID\_AUTHENTICATION” error message. So how do I go about getting a valid api token?

---

<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:** [December 15, 2023, 11:15pm UTC](https://community.hubspot.com/t/how-to-get-new-token/96210/2 "2023-12-15T23:15:16Z")

</div>

Hey, @LClark0 👋 HubSpot retired HAPI keys in 2022. There are a few choices for you moving forward.

You’ll either need to:

- create a [Private App](https://developers.hubspot.com/docs/api/private-apps) or
- set up a [Public App](https://developers.hubspot.com/docs/api/creating-an-app) using OAuth.

The **[Private App is created in-app](https://developers.hubspot.com/docs/api/private-apps)** and doesn’t require a heavy lift. You just need to provide the needed scopes, and it will work for auth for your specific portal.

Question – What app are you working with that needs a new key?

Best,

Jaycee
