Authorizations
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
Headers
A header for idempotency purposes
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.subscribers.preferences.retrieve("<id>");
// Handle the result
console.log(result);
}
run();
{
"global": {
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
}
},
"workflows": [
{
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "<string>",
"identifier": "<string>",
"name": "<string>"
}
}
]
}
Get subscriber global and workflow specific preferences
import { Novu } from "@novu/api";
const novu = new Novu({
secretKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await novu.subscribers.preferences.retrieve("<id>");
// Handle the result
console.log(result);
}
run();
{
"global": {
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
}
},
"workflows": [
{
"enabled": true,
"channels": {
"email": true,
"sms": true,
"in_app": true,
"chat": true,
"push": true
},
"overrides": [
{
"channel": "in_app",
"source": "subscriber"
}
],
"workflow": {
"slug": "<string>",
"identifier": "<string>",
"name": "<string>"
}
}
]
}
API key authentication. Allowed headers-- "Authorization: ApiKey <api_key>".
A header for idempotency purposes
Was this page helpful?