Unauthorized: Could not find stored client data for <clientKey>. Is this client registered?

I’m trying to build an app using the atlassian-connect-express example and am having trouble with the PROD environment installation. My app installs fine, but then I run into the error message below when viewing the app in my browser.

Unauthorized: Could not find stored client data for . Is this client registered?

I think the issue is me not storing/recalling the JWT correctly. I’m receiving it in the lifecycle.installed step but I can’t find any documentation on what to do with it or how to recall it properly.

Any help would be greatly appreciated!

I figured this out, and it might be because I don’t like to read docs but things were very unclear for me so I’m posting hoping this might help someone else.

The issue for me came down to the lifecycle.installed path, which I thought I needed to handle myself through express, but it turns out that ACE handles this for you??

Removing my app.post(’/installed’… from my routes/index.js, rebuilding and installing solved the problem.

1 Like

Hi @x2boarder,

Indeed, ACE handles /installed web-hook so you don’t have to.

If you still want to perform some actions upon installation, you can do it this way:

addon.on('host_settings_saved', (clientKey, {eventType}) => {
    // your code goes here
}

Cheers,
Jack