Forums

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

Create Issue not working for me [Jira Cloud]

Romisha Aggarwal December 27, 2018

I am trying to create issue using REST API in PHP. Here is my code

 

$headers = array(
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'Bearer' => $access_token
);

$body = <<<REQUESTBODY
{
"fields": {
"project":
{
"key": "<TEST>"
},

"issuetype": {
"id": "<ID>"
}
}
}
REQUESTBODY;

$response = Unirest\Request::post(
'https://yourdomain.atlassian.net/rest/api/3/issue',
$headers,
$body
);

 

 

But it returns

[issuetype] => The issue type selected is invalid.
                    [project] => Anonymous users do not have permission to create issues in this project. Please try logging in first.


I got the issueType ID from "rest/api/latest/issuetype"

 

Where do I need to add access. I need anonymous users to create issues.

Any help will be appreciated. 

2 answers

2 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 27, 2018

The issue type probably is not invalid, and it is the permissions that are the problem.  You should be using a user who has "create issue" rights in the project

>I need anonymous users to create issues.

No, you do not.  You can technically do it by allowing "anyone" the permission.  But it's suicide putting such a system on the internet as Cloud is - you will be attacked and taken down.

Romisha Aggarwal December 27, 2018

I can't see "create issue" rights anywhere. Right now I am using the free trial version. 

Hope there is no limitation with trial account.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 28, 2018

1.  Look at the permissions for the project

2.  Do NOT allow anonymous any form of create, comment, transition or edit.

0 votes
Deleted user September 16, 2021

I'm running into this issue, as well. I've created an api key for my account. I've added myself as an administrator to the project, as well. I still get 

 

`Anonymous users do not have permission to create issues in this project. Please try logging in first.`

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events