There are no "clientInfo" settings in the store for tenant "xxxxx"'

I’m freshly new to atlassian /Jira apps integrations.

I would like to interract with Jira REST API.

Here’s an example on the website

 app.get('/hello-world', addon.authenticate(), (req, res) => {

         const clientKey = req.context.clientKey;
         const httpClient = addon.httpClient({
             clientKey: clientKey  
         });

         httpClient.get(
             '/rest/api/content/search?limit=1&cql= id != 0 order by lastmodified desc',
             function(err, response, contents){
                 if(err || (response.statusCode < 200 || response.statusCode > 299)) {
                     console.log(err);
                     res.render('<strong>An error has occurred : '+ response.statusCode +'</strong>');
                 }
                 contents = JSON.parse(contents);
                 console.log(contents);
              
                 let page_title;
             
                 if(contents.size > 0){
                   page_title = contents.results[0].title;
                 }else{
                   page_title = "Error: no results";
                 }

                 res.render(
                   'hello-world.hbs', 
                   {
                     title: 'Atlassian Connect', 
                     updated_page: page_title
                   });
             }
         );   
     });

I would like to know where can I found the clientKey ?

I have tried password Token, domain url, but that’s not working.

1 Like