# API Authentication for OKTA

**URL:** <https://community.hubspot.com/t/api-authentication-for-okta/16374>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [September 22, 2019, 4:56pm UTC](https://community.hubspot.com/t/api-authentication-for-okta/16374 "2019-09-22T16:56:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamlewis10](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/adamlewis10/32/28418_2.png) [@adamlewis10](https://community.hubspot.com/u/adamlewis10)\
**Post date:** [September 22, 2019, 4:56pm UTC](https://community.hubspot.com/t/api-authentication-for-okta/16374/1 "2019-09-22T16:56:29Z")

</div>

Hi everyone. Does anyone have experience of connecting a Web API to HubSpot via OKTA SSO?

---

<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:** [September 23, 2019, 7:41pm UTC](https://community.hubspot.com/t/api-authentication-for-okta/16374/2 "2019-09-23T19:41:46Z")

</div>

Welcome, @adamlewis10.

At this time, HubSpot’s public APIs support [two methods of authentication](https://developers.hubspot.com/docs/methods/auth/oauth-overview):

- [API key](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key): A static master key which can be generated for each production account.
- [OAuth tokens](https://developers.hubspot.com/docs/methods/oauth2/oauth2-quickstart): Generated through [this OAuth 2.0 flow](https://developers.hubspot.com/docs/methods/oauth2/oauth2-quickstart). Expire every 6 hours.

It’s not possible to connect to the APIs _directly_ through OKTA SSO, but apps using OKTA can certainly also leverage either API keys or OAuth tokens to authenticate the requests to HubSpot.

Please let me know if I have misunderstood your query.
