import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const response = await client.audiences.listMembers('audience_id');
console.log(response.items);{
"paging": {
"more": true,
"cursor": "<string>"
},
"items": [
{
"added_at": "<string>",
"audience_id": "<string>",
"audience_version": 123,
"member_id": "<string>",
"reason": "<string>"
}
]
}Get list of members of an audience.
import Courier from '@trycourier/courier';
const client = new Courier({
apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});
const response = await client.audiences.listMembers('audience_id');
console.log(response.items);{
"paging": {
"more": true,
"cursor": "<string>"
},
"items": [
{
"added_at": "<string>",
"audience_id": "<string>",
"audience_version": 123,
"member_id": "<string>",
"reason": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
A unique identifier representing the audience id
A unique identifier that allows for fetching the next set of members