# Authentication error when using properties API.

**URL:** <https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [September 18, 2023, 8:21am UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804 "2023-09-18T08:21:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardeen](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bardeen](https://community.hubspot.com/u/bardeen)\
**Post date:** [September 18, 2023, 8:21am UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/1 "2023-09-18T08:21:19Z")

</div>

I’m getting the following error:

`This API can't be called using an OAuth access token. A valid developer API key must be provided in the `hapikey`query parameter, and a valid`appId` must be provided in the API request.`

When using Properties API

`/crm/v3/properties/{objectType}/batch/read`

The [api docs](https://developers.hubspot.com/docs/api/crm/properties) doesn’t seem to mention that any additional authentication should be passed along with oAuth.

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [September 18, 2023, 2:01pm UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/2 "2023-09-18T14:01:15Z")

</div>

Hi @bardeen,

Please pass actual private app’s key or access token in the place of YOUR\_ACCSESS\_TOKEN to the following statement:

" **authorization: bearaer YOUR\_ACCSESS\_TOKEN"**

Hope this will helps you out. Please mark it as **Solution Accepted & Upvote** to help other Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![bardeen](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bardeen](https://community.hubspot.com/u/bardeen)\
**Post date:** [September 18, 2023, 3:54pm UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/3 "2023-09-18T15:54:36Z")

</div>

Thanks for the reply!  
I’m actually using Public App with oAuth authentication, according to the docs it should be possible to use this API with oAuth authentication, am I missing something here?

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [September 19, 2023, 8:54am UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/4 "2023-09-19T08:54:42Z")

</div>

Hi @bardeen

Can you please share the screenshot of the query you are facing so that i can help you with the exact solution.

Thanks!

---

<div class="post-metadata">

**Author:** ![bardeen](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@bardeen](https://community.hubspot.com/u/bardeen)\
**Post date:** [September 21, 2023, 12:59pm UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/5 "2023-09-21T12:59:25Z")

</div>

Hi @GRajput  
I’m trying to use the following query with oAuth authentication. My app has all required scopes, but still it doesn’t allow me.

 ![bardeen_0-1695301117438.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/d/ede263294e91e2daa194ddbade8a6b535b2dc5df.jpeg)

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [September 21, 2023, 2:04pm UTC](https://community.hubspot.com/t/authentication-error-when-using-properties-api/89804/6 "2023-09-21T14:04:02Z")

</div>

Hi @bardeen

Firstly test your code in the doc and check the response and share with us here (Screenshot).

 ![GRajput_0-1695305023412.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/1/1150382e9a06bd72b6a8ef2575a4cc84177e74be.jpeg)

Thanks!
