docs icon indicating copy to clipboard operation
docs copied to clipboard

Issues on the doc - <Inbox/> Headless Tab

Open Anishpras opened this issue 7 months ago • 3 comments

Hi Novu Team,

I noticed that the current documentation for the @novu/js package still references the use of an apiKey when initializing the Novu instance:

import { Novu } from "@novu/js";

const novu = new Novu({
  apiKey: 'YOUR_API_KEY',
});

However, this no longer seems to work, as the apiKey property is not recognized or used by the latest version of the SDK. The correct initialization method appears to be:

import { Novu } from "@novu/js";

export const novu = new Novu({
  applicationIdentifier: '',
  subscriberId: '',
});

To help avoid confusion for other developers, I recommend updating the documentation to reflect this change. I’m happy to contribute by submitting a PR to update the docs if that would be helpful.

Let me know how you’d like to proceed!

Anishpras avatar Apr 09 '25 21:04 Anishpras

Yes, this is actually risky. Some folks might put their secret key there, because it literally says apiKey :)

paul-github-1 avatar May 04 '25 02:05 paul-github-1

I’ve submitted a PR to update the documentation as discussed in this issue. It replaces the deprecated apiKey initialization with the correct usage of applicationIdentifier and subscriberId in the <Inbox /> Headless Tab section.

PR: #835

Anishpras avatar May 04 '25 06:05 Anishpras