# https://api.hubapi.com/automation/v4/actions/ and oAuth2

**URL:** <https://community.hubspot.com/t/https-api-hubapi-com-automation-v4-actions-and-oauth2/74819>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [February 9, 2023, 8:20am UTC](https://community.hubspot.com/t/https-api-hubapi-com-automation-v4-actions-and-oauth2/74819 "2023-02-09T08:20:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCOGNET](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@JCOGNET](https://community.hubspot.com/u/JCOGNET)\
**Post date:** [February 9, 2023, 8:20am UTC](https://community.hubspot.com/t/https-api-hubapi-com-automation-v4-actions-and-oauth2/74819/1 "2023-02-09T08:20:33Z")

</div>

Hello !

I cannot success to use oAuth2 with [https://api.hubapi.com/automation/v4/actions/](https://api.hubapi.com/automation/v4/actions/).

I can get token with

curl “[https://api.hubapi.com/oauth/v1/token/](https://api.hubapi.com/oauth/v1/token/)” …

I can use token, by example :

curl --header “Authorization: Bearer CLfZyarjM” [https://api.hubapi.com/contacts/v1/lists/all/contacts/all\?count\=1](https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1)

I CANNOT use this token to get actions :

curl --header “Authorization: Bearer CLfZya…” [https://api.hubapi.com/automation/v4/actions/1421444](https://api.hubapi.com/automation/v4/actions/1421444)

{“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”:“242eb07b-4916-4ef3-b658-e3770441b960”,“category”:“INVALID\_AUTHENTICATION”}](https://developers.hubspot.com/docs/methods/auth/oauth-overview%22,%22correlationId%22:%22242eb07b-4916-4ef3-b658-e3770441b960%22,%22category%22:%22INVALID_AUTHENTICATION%22%7D)

Same call with Hapikey works

curl "[https://api.hubapi.com/automation/v4/actions/1421444?hapikey=eu](https://api.hubapi.com/automation/v4/actions/1421444?hapikey=eu)…

"{“results”:[]}

Strange No ?

Another information : Accidentally I have tried with an old token and I received message that tells that it had expired

curl --header "Authorization: Bearer CJfqp… " [https://api.hubapi.com/automation/v4/actions/1421444](https://api.hubapi.com/automation/v4/actions/1421444)  
{“status”:“error”,“message”:“The OAuth token used to make this call expired 13 minute(s) ago.”,“correlationId”:“3d0fdcd0-34ef-425a-a92f-462ca2374092”,“category”:“EXPIRED\_AUTHENTICATION”,“context”:{“expire time”:[“2023-02-09T07:53:07.607Z”]}}

Any idea ? It looks like a bug … confirm ?

---

<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:** [February 10, 2023, 11:01pm UTC](https://community.hubspot.com/t/https-api-hubapi-com-automation-v4-actions-and-oauth2/74819/2 "2023-02-10T23:01:25Z")

</div>

Hi, @JCOGNET 👋 To confirm, you are using the endpoints listed here — [Custom Workflow Actions](https://developers.hubspot.com/docs/api/automation/custom-workflow-actions)? If so, most of the endpoints on that page **only** work with a Developer API key and not with OAuth or a Private App.

 ![CleanShot 2023-02-10 at 15.55.43.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/d/2d9e8242a9691136cceb1865b928d59474196006.jpeg)

 ![CleanShot 2023-02-10 at 15.56.11.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/faaba5a04508cb4f4aa77c73d31afac7e3c91abb.jpeg)

To help anyone else who finds this post, you can find your Developer API Key in your Developer Portal. It will have a banner at the top stating “ **This is an app developer account.** ” From there, you click Apps \> Get HubSpot API key.

 ![CleanShot 2023-02-10 at 15.57.03.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/2/72288995185289b2e79d856bd5835d16edd97fdf.png)

If you are using a different endpoint, please link it here for the community.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![panchitofrancia](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@panchitofrancia](https://community.hubspot.com/u/panchitofrancia)\
**Post date:** [August 12, 2025, 4:17pm UTC](https://community.hubspot.com/t/https-api-hubapi-com-automation-v4-actions-and-oauth2/74819/3 "2025-08-12T16:17:35Z")

</div>

Hello,  
It’s not working for me and not working with : personal dev key, dev key, oauth2…  
So bad the lack of informations about it…  
Edit: found  
You need to use dev api key as  
[https://api.hubapi.com/automation/v4/actions/APPID?hapikey=XXXX](https://api.hubapi.com/automation/v4/actions/APPID?hapikey=XXXX)
