Create repository_dispatch event from a GitHub App?

I was thinkin about publishing repository_dispatch event from a GitHub App in order to trigger a GitHub Action. The documentation is only mentioning publishing it via personal access token and when I tried to publish is as an App I got “403 Forbidden” response. Is it possibe to publish repository_dispatch event from a GitHub App?

@fkorotkov - The endpoint for creating a repository dispatch event is enabled for GitHub Apps, as long as the GitHub App has both of the following permissions:

I can confirm here that the endpoint is missing from the "Permission on contents" section of GitHub Developer and we have an open issue internally tracking that for our documentation team to review.

The 403 Forbidden response can be returned for a number of reasons: an authentication issue, making a request despite an exhausted rate limit, or even a missing user agent.

What would help us determine the exact reason would be the full output (or request-response pair) for a curl -v request demonstrating this. We ask that you mask any sensitive information like OAuth tokens and Authorization headers in the output of the curl command.

Here’s an example request:

curl -v -H "Authorization: token $APP_INSTALLATION_TOKEN" -X POST -d '{"event_type": "on-demand-test"}'