Forums

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

Struggling to authenticate requests with atlassian-connect-express

Oliver Siebenmarck
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!
January 31, 2019

Hi, 

I'm building a Confluence add-on and am having trouble to create an authenticate request to the Confluence API using the atlassian-connect-express (ACE) api. Here's what I'm trying (simplified):

a) To set the clientKey

const httpClient = this.addon.httpClient({
clientKey: event.clientKey
});

b) To create the request

 httpClient.get({
url: uri,
headers: {
'X-Atlassian-Token': 'nocheck'
}
},…

However, I always get a 401 error. In the response body, Confluence complains that the QSH is not correct ('qsh should be 'XXX' instead of 'YYY'). 

If I create the request manually and set the QSH to what Confluence asks me to, everything works fine, but I'd really like to use ACE here and fail to see what I'm doing wrong. 

Any pointers as to where I might have gone wrong?

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events