# Analytics API using API Key

**URL:** <https://community.hubspot.com/t/analytics-api-using-api-key/16985>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, oauth\
**Created:** [October 30, 2019, 8:14pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985 "2019-10-30T20:14:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarterChilds](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carterchilds/32/30597_2.png) [@CarterChilds](https://community.hubspot.com/u/CarterChilds)\
**Post date:** [October 30, 2019, 8:14pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/1 "2019-10-30T20:14:34Z")

</div>

Hi, I want to get data about our landing pages using the API. We are unable to use OAuth in our application and cannot justify getting the Enterprise account in order to use the API Key in the analytics API. Is there any other way I can get that data via the API?

---

<div class="post-metadata">

**Author:** ![natsumimori](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/natsumimori/32/39807_2.png) [@natsumimori](https://community.hubspot.com/u/natsumimori)\
**Post date:** [October 31, 2019, 5:02am UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/2 "2019-10-31T05:02:52Z")

</div>

Hi @CarterChilds,

Thank you for reaching out to Community.

Would you be able to specify exactly which API you are trying to use? Here is the [API Overview documentation](https://developers.hubspot.com/docs/overview). Please include the link to one of the pages so that the community can help you further.

Thank you,

Natsumi

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 31, 2019, 4:22pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/3 "2019-10-31T16:22:50Z")

</div>

Hi, @CarterChilds.

Unfortunately, no. HubSpot only supports [two methods of authentication](https://developers.hubspot.com/docs/methods/auth/oauth-overview): OAuth tokens and API keys.

I totally understand if an _Enterprise_ subscription is out of the question in order to use an API key with the [Analytics API](https://developers.hubspot.com/docs/methods/analytics/get-analytics-data-by-object), but can you expand upon why you are unable to use OAuth?

---

<div class="post-metadata">

**Author:** ![CarterChilds](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carterchilds/32/30597_2.png) [@CarterChilds](https://community.hubspot.com/u/CarterChilds)\
**Post date:** [October 31, 2019, 5:21pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/4 "2019-10-31T17:21:39Z")

</div>

We are using this data for a small app within our marketing team and do not want users to have to authenticate through Hubspot.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 31, 2019, 5:35pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/5 "2019-10-31T17:35:17Z")

</div>

Hi, @CarterChilds.

A single user can authenticate the app for the entire account and all its users. As long as you have an automated process to refresh access tokens, no one will have to go through the auth flow again unless the app becomes disconnected.

Will that still not work?

---

<div class="post-metadata">

**Author:** ![CarterChilds](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carterchilds/32/30597_2.png) [@CarterChilds](https://community.hubspot.com/u/CarterChilds)\
**Post date:** [October 31, 2019, 5:44pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/6 "2019-10-31T17:44:46Z")

</div>

I can defintiely give that a try, thank you.

---

<div class="post-metadata">

**Author:** ![CarterChilds](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carterchilds/32/30597_2.png) [@CarterChilds](https://community.hubspot.com/u/CarterChilds)\
**Post date:** [October 31, 2019, 5:58pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/7 "2019-10-31T17:58:04Z")

</div>

Is there a guide on how to set up OAuth in this manner?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [November 1, 2019, 3:03pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/8 "2019-11-01T15:03:47Z")

</div>

Hi, @CarterChilds.

All HubSpot apps use OAuth in this way, so the [OAuth 2 Quickstart Guide](https://developers.hubspot.com/docs/methods/oauth2/oauth2-quickstart) is probably the best resource, as it walks through the entire process.

Once the backend process to request access and refresh tokens is completed, a user connecting the app to your account will complete [these steps](https://developers.hubspot.com/docs/faq/installing-an-app).

---

<div class="post-metadata">

**Author:** ![CarterChilds](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/carterchilds/32/30597_2.png) [@CarterChilds](https://community.hubspot.com/u/CarterChilds)\
**Post date:** [October 31, 2019, 5:19pm UTC](https://community.hubspot.com/t/analytics-api-using-api-key/16985/9 "2019-10-31T17:19:58Z")

</div>

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fmethods%2Fanalytics%2Fget-data-for-hubspot-content)**
