I can't create an issue through Jira Rest API in Python

Test_Jira December 8, 2022

Good afternoon. I use the Jira and Python client, Telegram, I register through the project administrator. I specify a task, an executor, a priority, and when I click "create a task", I get an error in the console.

Why is this happening? After all, I am an administrator, and I can log in through the browser and create a task manually. Please help me.

 

{"errorMessages":["You do not have permission to create issues in this project."],"errors":{}}

2 answers

0 votes
Test_Jira December 8, 2022

Безымянный.png

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2022

Welcome to the Atlassian Community!

This is exactly what it says it is - the account you are using for the connection does not have "create issue" permission in the project you are trying to create the issue in.

There's two possibilities in your case usually - first that you are logging in as someone who has admin rights, but still does not have create issue in the project (admin rights means admin, not "can do anything"), and second that while you think you're logging in with one user on your device, you're actually not.

Test_Jira December 8, 2022

I log in through the administrator, enter the email and the APIkey token. In the settings you can see that the token is used during registration. I'm in the same way, I go through this user through the browser, and I normally create a task, without problems.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2022

I'm afraid there's not a lot we can help you with.  The message you are getting is clear that you are logging in with an account that does not have "create issue" in that project.

Can you do other things with the REST API from this application?  A good test would be to edit or comment on an issue and then go look at the issue in the UI, see what account actually made the change.

Test_Jira December 8, 2022

I can do this through the browser, under the user through which I log in. Create, delete, change status, edit. But I can not create a task through the script. I also created a new user, gave him all the rights, added a token. But he also cannot do anything through the script. If it helps, I can send part of the code

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2022

I'm not sure seeing the code would help, what we really need to see is that the user you are using to log in is the one you think it is.

Even if you set up a simple dummy project (to be thrown away later) with basic rights for everyone to create, and see what your script is passing in as the user, I suspect you are going to find it's not the user you think it is.

Test_Jira December 8, 2022

OK. How to solve the problem in this case? We pulled out all the project IDs, entered them into the issuetype.
Example: issuetype ID " ". And in the end, for all projects, he writes that there are no rights

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2022

You need to test which user your REST call is actually using to get into Jira.  We can't get any further with this until we can show which user Jira is accepting the login for.

Test_Jira December 8, 2022

It uses the user I'm logged in as. If I use another user, they will not let me go further, it will give an error. I have only 2 users on the project, and I logged in through them. Also, the API token is public, that I go through it

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2022

Can you show us that your user can make changes somewhere else and be logged as the right one?

What does a "public" token mean?  Who does it identify?

Test_Jira December 8, 2022

I mean the API token that grants access to the products. It's in the settings.

Test_Jira December 8, 2022

I can't upload an image here

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 9, 2022

Ok, but can you show us that your user can make changes somewhere else and be logged as the right one?  When using the API?

Suggest an answer

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

Atlassian Community Events