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

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 Leaders.
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 Leaders.
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

Suggest an answer

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

Atlassian Community Events