Can we get an API key of an actor?

My colleague told me that when he set up an automation in Jira, he can choose the “actor” as “Automation for Jira”.

I have some other automation that uses REST API to perform, so I would need an API key to do that, and it is currently using my own API key, which makes the ticket histories full of actions on my behalf. This caused confusion because people don’t know whether those actions are performed by me or by the automation flow.

Before creating another account to get another API key, is there a way that I can make the actor of those histories “Automation for Jira” instead? e.g. An API key of this “Automation for Jira”?

The reason Automation for Jira can act as a user is because it is an Atlassian Connect app. It does not use API keys. The Connect framework creates special service accounts for apps (hence the “Automation for Jira” user) and allow for user impersonation if the ACT_AS_USER scope is set upon installation.

If you wish to replicate this behaviour with your own scripts, you will have to re-create them as a Connect app instead. That will give you a service account and the ability to impersonate users.


@siralam in addition to what @remie has said which is correct, another option would be to create a service account from a normal user account for your automation.

The main benefit is that you could limit the permissions to whatever is required (ie read / write to only one project) and the risk if you lose the API token is reduced. The other benefit is you can call it something useful like acme-automation

Obviously the downside is that this would count against your licence.

1 Like