Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add REST API permissions to specific (not admin) user

Aleksandar Colic October 21, 2022

Hi,

 

In order to automatically create issues in the Jira project, I've made a js script that works. I am a Jira administrator and use my own token.

However, when a colleague tried to run the same script with his own token, it failed.

 

Is there a way to use API without being an administrator?

 

Regards,

Aleksandar

 

4 answers

4 accepted

0 votes
Answer accepted
Aleksandar Colic October 21, 2022

Hi @marc -Collabello--Phase Locked- 

 

There was a typo in our script. Thanks and sorry for this.

It is working now! :)

0 votes
Answer accepted
Aleksandar Colic October 21, 2022

Hi @marc -Collabello--Phase Locked- 

 

All permissions are assigned to this user and it still fails.

0 votes
Answer accepted
Aleksandar Colic October 21, 2022

Hi @marc -Collabello--Phase Locked- 

 

Thank you for your response. The mentioned user has "Administer Projects" permission for the project he needs API access. There is no other permission that can be added and is related to API usage. Any help, please?

marc -Collabello--Phase Locked-
Community Champion
October 21, 2022

There is no specific API usage permission.

Maybe the problem is related to browser usage of the js script and CORS restrictions?

Aleksandar Colic October 21, 2022

I've tried to run the script with the user's credentials on my machine and it fails. Therefore, it's not related to browser usage of the js script and CORS restrictions.

marc -Collabello--Phase Locked-
Community Champion
October 21, 2022

What is the error you get?

0 votes
Answer accepted
marc -Collabello--Phase Locked-
Community Champion
October 21, 2022

Hi @Aleksandar Colic 

every user can use the REST API with their own token.  However what a user can do is constraint by their permissions.  If the user has not enough permissions on a project, REST API calls will fail.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events