Issues with using Automation Rest API with forge App

Hello ,
I am trying to test automation rest APIs using forge app,
like this one

I am facing an issue that always I am getting 401 response,
knowing that I added these scopes,
permissions:

scopes:

- read:jira-user

- read:jira-work

- write:jira-work

- manage:jira-project

- manage:jira-configuration

- manage:jira-webhook

I have tried asApp(), and asUser(),
can you please guide me maybe I am missing something,
kind regards,

Hi @AliSalem1

In the link you add, for Invoke a manual rule Post, it right:

Forge and OAuth2 apps cannot access this REST resource.

Hi @AliSalem1 ,

If you want to integrate with Automation from a Forge app, the supported way is to expose a custom Automation action using the Automation action module.

Docs: https://developer.atlassian.com/platform/forge/manifest-reference/modules/automation-action/

Then the rule executes your Forge function as a step inside the Automation rule.