API token requires `notifications` and `repository` permissions. See the [gitea documentation](https://docs.gitea.com/development/api-usage#generating-and-listing-api-tokens) for details on generating tokens.
API tokens can be generated on the `User Settings` -> `Applications` page and require `notifications` and `repository` permissions.
There is currently a limit (20) to how many issues are received in the API call, but this can be increased by adding the following in the Gitea app.ini file.