#4982 It's impossible to create API key with issue_change_status, issue_update permissions
Closed: Fixed by pingou. Opened by spichugi.

We need to be able to close issues using API key. I've generated the API key with all checkboxes but it still refuses to do so.

libpagure.exceptions.APIError: Invalid or expired token. Please visit https://pagure.io/settings#nav-api-tab to get or renew your API token., details: "Missing ACLs: issue_change_status, issue_update"

Screenshot_from_2020-09-03_21-02-43.png


There are two places where one can create API token:

  • In your user's settings. This allows to create API tokens that work across projects, however, not all ACLs are available across projects.

  • In the project's settings. This allows to create API tokens that are restricted to a specific project.

It looks like the ACLs: issue_change_status and issue_update are present in the project's settings API creation page and not in the user's settings one.
Making them available across projects may be doable, it may involve a (little) code change and a configuration change, or just a configuration change (depending on what the current code allows).

@spichugi told me that they were able to generate the API tokens they were looking for.

So we can close this as "Fixed" for now.

Thanks for your report!

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata