Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

Salesforce to Jira Callout Failed ! Edited

When ever trying to hit the Jira Api's

Getting below response:

JSON Response: {"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}

Moreover When i directly try to hit the endpoint URL , It works for me.

I have admin access for my user and still getting this error.

 

Below is the code snippet 

public string username ='XXXXXX';
public string password ='XXXXXXXXX';
HTTP h = new HTTP();
HTTPRequest r = new HTTPRequest();
r.setEndpoint('https://wuservicecloud.atlassian.net/rest/api/latest/issue/38281');

System.debug('User name'+username );
System.debug('Password'+password);
Blob headerValue = Blob.valueOf(username+':'+password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
r.setHeader('Authorization', authorizationHeader);
r.setHeader('Content-Type','application/json');
r.setMethod('GET');
System.debug('authorizationHeader ---->'+authorizationHeader );
HTTPResponse res = h.send(r);
System.debug('JSON Response: ' + res.getBody());

 

 

 

Kindly assist

1 comment

Looks like the user you are using does not have access to that project (remember, Admin rights mean Admin, not "arbitrarily access everything").  Or it doesn't exist.

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you