# API permission error

**URL:** <https://community.hubspot.com/t/api-permission-error/78856>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [April 6, 2023, 2:06pm UTC](https://community.hubspot.com/t/api-permission-error/78856 "2023-04-06T14:06:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandan988](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@chandan988](https://community.hubspot.com/u/chandan988)\
**Post date:** [April 6, 2023, 2:06pm UTC](https://community.hubspot.com/t/api-permission-error/78856/1 "2023-04-06T14:06:13Z")

</div>

Till 15 March 2023, My API was working to create contacts, But now its giving error

This hapikey (xyz) does not have proper permissions! (requires all of [contacts-read])

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [April 7, 2023, 10:58pm UTC](https://community.hubspot.com/t/api-permission-error/78856/2 "2023-04-07T22:58:47Z")

</div>

Hey, @chandan988. Without seeing the scopes and other additional info, it’s likely the community cannot offer a guess to root causes. Can you add any additional context to your post?

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![chandan988](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@chandan988](https://community.hubspot.com/u/chandan988)\
**Post date:** [April 8, 2023, 1:12am UTC](https://community.hubspot.com/t/api-permission-error/78856/3 "2023-04-08T01:12:00Z")

</div>

From which section we can give scoper permission in Hubspot for API to read & write

In-App permission is already given, but API is still giving error

---

<div class="post-metadata">

**Author:** ![BHarrison-Cook](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bharrison-cook/32/31851_2.png) [@BHarrison-Cook](https://community.hubspot.com/u/BHarrison-Cook)\
**Post date:** [April 13, 2023, 2:31pm UTC](https://community.hubspot.com/t/api-permission-error/78856/4 "2023-04-13T14:31:49Z")

</div>

Hi @chandan988 , The hapikey was sunsetted by HubSpot and is no longer a supported authentication method: [Upcoming: API Key Sunset](https://developers.hubspot.com/changelog/upcoming-api-key-sunset)

You will need to switch to using OAuth and a Private App instead.

Hope that helps.
