The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

create userr api return 401

马永明
September 21, 2020

curl --request POST \
--url 'http://xxx:8080/rest/api/2/user' \
--user 'xxx@qq.com:my-api-token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"password": "123456",
"emailAddress": "test@test.com",
"displayName": "sunny",
"name": "sunny"
}'

QQ图片20200921171851.png

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Niranjan
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 Champions.
September 21, 2020

Hi,

Is your JIRA instance a cloud hosted one? If so, can you confirm if the URL in your POST call is correct?

0 votes
Niranjan
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 Champions.
September 21, 2020

Error code 401 says You are unauthenticated. Kindly verify the credentials used for user creation.

马永明
September 21, 2020

Hello, I have applied for and used api_token, how to verify it? Is my usage method wrong? Can you give me an example? For example, the email is xxx@139.com, api_token is abc_xxxxxxxxxxx, and url is http://xxx:8080/rest/api/2/user

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events