Hello everyone
I want to connect to Confluence space using API Token
I want to display data on my website using pure JS
First of all, I am stuck on generating proper access token as I am trying this method to work
I got token from my customer which is 24 characters long
and it doesn't work using method below,
Is there a way to generate API Token for Confluence only?
fetch('https://your-domain.atlassian.net/wiki/rest/api/content', {
method: 'GET',
headers: {
'Authorization': 'Bearer <access_token>',
'Accept': 'application/json' } }
).then(response => {
console.log( `Response: ${response.status} ${response.statusText}` );
return response.text(); }
).then(text => console.log(text))
.catch(err => console.error(err));