Could not find authentication data on request

I’m doing my first steps in Confluence Development and I did the Custom Content tutorial: Working with custom content.

The App does what it is supposed to do, but on the server side console I get this message after storing a new Customer (aka a new Custom Content item):
{ ctx: {} } Authentication verification error (401): Could not find authentication data on request

As I understood the docs, as long as I’m using the AP.request() in the client or the Addon.httpClient.get() methods I would not need to take care about auth because it is handled internally. But why does this message show up?

1 Like

Hi, I’m also facing the same issue.

I have created the connect app using node express, and I’m trying to hit the AP.context API inside express api, like this.

    app.get('/hello-world', addon.authenticate(), (req, res) => {
        AP.context.getToken(function(token){
          console.log("JWT token string", token);
          res.send("JWT token string", token);
        });
    });

Could you please tell, What I’m doing wrong.

Its saying , “Could not find authentication data on request”

The AP api only works in the browser, not in server side express.

1 Like

Thank You very much Marc, Atleast I got a response with some valuable info.