# INVALID\_AUTHENTICATION

**URL:** <https://community.hubspot.com/t/invalid-authentication/25473>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [September 15, 2020, 10:17am UTC](https://community.hubspot.com/t/invalid-authentication/25473 "2020-09-15T10:17:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tonilemlist](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tonilemlist/32/9140_2.png) [@tonilemlist](https://community.hubspot.com/u/tonilemlist)\
**Post date:** [September 15, 2020, 10:17am UTC](https://community.hubspot.com/t/invalid-authentication/25473/1 "2020-09-15T10:17:29Z")

</div>

why the server respond with INVALID\_AUTHENTICATION

`StatusCodeError: 401 - {"status":"error","message":"Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview","correlationId":"060d4bba-aa7e-4884-8202-d53e7bdbbf28","category":"INVALID_AUTHENTICATION"}`

this user already multiple call on hubspot and didn’t had any issue, now we experience this one

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [September 15, 2020, 10:22am UTC](https://community.hubspot.com/t/invalid-authentication/25473/2 "2020-09-15T10:22:04Z")

</div>

Hey @tonilemlist,

This error is encountered when you pass no authentication value when you’re making your calls.

Depending on how the calls are being made, you’ll want to ensure your authentication method, whether this is your Hapikey or a bearer-token from OAuth is included in the request itself.

As an example, if we use a REST client like Postman, we can include our hapikey in the request URL like this:

```lia-code-sample
https://api.hubapi.com/contacts/v1/contact/?hapikey=demo

```

For authenticating calls [using OAuth](https://legacydocs.hubspot.com/docs/methods/oauth2/oauth2-overview), we can use the Bearer-token option like this:

```lia-code-sample
Authorization: Bearer <token>

```

I hope this helps!

---

<div class="post-metadata">

**Author:** ![ARandive](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/arandive/32/84335_2.png) [@ARandive](https://community.hubspot.com/u/ARandive)\
**Post date:** [September 8, 2021, 4:07am UTC](https://community.hubspot.com/t/invalid-authentication/25473/3 "2021-09-08T04:07:09Z")

</div>

I have pass the hapikey value to call enpoints of calling extension sdk but still getting same error

---

<div class="post-metadata">

**Author:** ![ARandive](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/arandive/32/84335_2.png) [@ARandive](https://community.hubspot.com/u/ARandive)\
**Post date:** [September 8, 2021, 4:10am UTC](https://community.hubspot.com/t/invalid-authentication/25473/4 "2021-09-08T04:10:09Z")

</div>

I have pass the hapikey value to call enpoints of calling extension sdk but still getting same error

[https://api.hubapi.com/crm/v3/extensions/calling/38\*\*48/settings?hapikey=456\*\*\*\*cfa](https://api.hubapi.com/crm/v3/extensions/calling/38 **48/settings?hapikey=456**** cfa)
