# HubSpot API (Private App) – "Authentication credentials not found" error

**URL:** <https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187>\
**Category:** APIs & Integrations\
**Tags:** python, developer-tools\
**Created:** [April 10, 2026, 11:23am UTC](https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187 "2026-04-10T11:23:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YamilAli2](https://avatars.discourse-cdn.com/v4/letter/y/a183cd/32.png) [@YamilAli2](https://community.hubspot.com/u/YamilAli2)\
**Post date:** [April 10, 2026, 11:23am UTC](https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187/1 "2026-04-10T11:23:40Z")

</div>

Hi! I’m trying to test the HubSpot API by making the following request with a Python script:

import requests  
url = "[https://api.hubapi.com/crm/v3/objects/contacts?limit=100&archived=false"  
headers = {“authorization”: “Bearer MY\_TOKEN”}  
response = requests.get(url, headers=headers)  
print(response.text)](https://api.hubapi.com/crm/v3/objects/contacts?limit=100&archived=false)

But I’m getting this error:

{  
“status”: “error”,  
“message”: "Authentication credentials not found. This API supports OAuth 2.0 authentication and you can find more details at [https://developers.hubspot.com/docs/methods/auth/oauth-overview",  
“correlationId”: “019d7712-d98f-7622-ad7a-045a0bcb177b”,  
“category”: “INVALID\_AUTHENTICATION”  
}](https://developers.hubspot.com/docs/methods/auth/oauth-overview)

What should I check? I’ve already verified the token and it seems correct. I also checked the permissions granted when creating the private app (I gave it the “crm.objects.contacts.read” scope), so that looks fine too.

Is there anything else I should review?

Thanks, regards!

---

<div class="post-metadata">

**Author:** ![stassey](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stassey/32/36_2.png) [@stassey](https://community.hubspot.com/u/stassey)\
**Post date:** [April 10, 2026, 3:38pm UTC](https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187/2 "2026-04-10T15:38:38Z")

</div>

Hey @YamilAli2,

Welcome to the Community!

In the meantime, these resources that I’ve included below may be worth exploring!

- 📄 [HubSpot Private Apps Overview](https://developers.hubspot.com/docs/api/private-apps)
- 💬 [Authentication credentials not found “INVALID\_AUTHENTICATION”](https://community.hubspot.com/t5/APIs-Integrations/Authentication-credentials-not-found-quot-INVALID-AUTHENTICATION/m-p/764354) _(similar thread in the community)_

I’m also tagg in some of our top contributors who may be able to help troubleshoot further:

Hey @SteveHTM, [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811), @Josh -- Do you have any suggestions for @YamilAli2 on this?

Thanks in advance!

Sam, Community Manager

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [April 10, 2026, 4:03pm UTC](https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187/3 "2026-04-10T16:03:45Z")

</div>

@YamilAli2 - I hope I can give you a good Pyton example here. I use these techniques almost every day in Custom workflow steps, so I have some conventions that work well for me.

Header setup - via a stored Secret.

```lia-code-sample
 #Get the API key as environment variable
 api_token=os.getenv('CUSTOM_TOKEN')
 #API Request Headers
 headers = {
 'Content-Type': 'application/json',
 'Authorization': 'Bearer ' + api_token,
 }

```

GET call via requests:

```lia-code-sample
 try:
 response = requests.request("GET", request_url, headers=headers)
 Jresp = response.json()
 except:
 print(response)

```

As long as you have set up required scopes any specific API URL in your Legacy/Private app/Service Keys , all should see a positive response.

Hope this is helpful.

Steve

---

<div class="post-metadata">

**Author:** ![YamilAli2](https://avatars.discourse-cdn.com/v4/letter/y/a183cd/32.png) [@YamilAli2](https://community.hubspot.com/u/YamilAli2)\
**Post date:** [April 10, 2026, 5:42pm UTC](https://community.hubspot.com/t/hubspot-api-private-app-authentication-credentials-not-found-error/148187/4 "2026-04-10T17:42:39Z")

</div>

Hi! thanks, it worked perfectly! Regards!
