Forums

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

connect api on jira servicedesk

Eduardo Henrique Merchiori
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

I'm working on an API connection from Jira servicedesk, where I try to create a request via API, whenever I try to do the test in Postaman (testing and developing API's), it presents the error below:

 "message": "Client must be authenticated to access this resource.",    "status-code": 401

I'm passing as basic authentication the name of the token and the password created, the link I'm following for the api to know is this:

https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request / # api-rest-servicedeskapi-request-post

 

could you help me?

1 answer

1 accepted

0 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 6, 2020

Hi Eduardo, welcome to the Community!

For basic auth, you'll want to use the email address as the username and an API token in the password field. Details about how to use these with Atlassian Cloud are listed here. In short, you generate a new token from id.atlassian.com and use that in place of a password. The advantage to this is that you can have multiple tokens on your account (one per application) and they can be easily revoked!

So to recap, when using Postman, you'll want to select the Basic Auth type in the Authorization tab, and enter these for the parameters:

  • username: your-email-address@example.com
  • password: API-token

Hope that helps!

Cheers,
Daniel

Ian Russel Adem
Contributor
July 13, 2020

Hi @Daniel Eads , I created a user tru this https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-post. If username and password is deprecated in favor of api tokens, whats the point of creating a user with password? Previously when our users login in a customer portal, we used their supplied username and pass to authenticate in Jira and get their profiles. But it no longer works in our new Jira cloud instance, I already tried authentication using  encoded user email and api token, not working.My question is, how can I authenticate my user if this login no longer works ?wierdjiralogin.png 

Ian Russel Adem
Contributor
July 13, 2020

@Daniel Eads I created a user by following this link https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-user-post. My question is, if username and password is deprecated in favor of email:apitoken, whats the point of creating user with password(random password is generated when not supplied by the user). Also, when creating new user, whats the correct api for them to login? Previously, we can fetch the user info by using the user supplied username and password when they loggin in our customer facing portal, but now it will not work.Kindly see my screenshot. I also tried encoding email and token and pass as Authorization header(Authorization: Basic longencode64base) but no luck.wierdjiralogin.png

Suggest an answer

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

Atlassian Community Events