#Unable to set integration id when setting subscriber credentials
1 messages · Page 1 of 1 (latest)
While I generate an answer, here are some sources that might be helpful:
Answer
It sounds like you are encountering an issue with setting the integrationIdentifier when updating subscriber credentials for OneSignal in Novu. As of now, the Novu API supports specifying an integrationIdentifier to select a specific integration, but it appears that you are experiencing difficulties.
Here's how you can set the integrationIdentifier when using the setCredentials method:
import { Novu, PushProviderIdEnum } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
await novu.subscribers.setCredentials('subscriberId', PushProviderIdEnum.OneSignal, {
deviceTokens: ['ad0452ca-3ca7-43b5-bf9b-fa93fd322035'], // Your user's unique 'player_id' from OneSignal
integrationIdentifier: 'one-signal-MnGLxp8uy' // The specific OneSignal provider integration ID
});
If you're encountering an error, double-check that:
- The
integrationIdentifierprovided matches the correct ID of the OneSignal provider you want to use. - The
providerIdis correctly set toone-signal.
For reference, see the official documentation on updating subscriber credentials here (1) .
If the issue persists, you might want to ensure you're using the latest version of the Novu SDK, as there was a recent update to include the integrationIdentifier field in the Node.js SDK (2) .