Create and publish a consent notice
Create a consent notice
const bent = require("bent");
const organizationId = "<organizationId>";
const token = "<token>"; // Get a token by authenticating in the API (https://developers.didomi.io/api/introduction/authentication)
const client = {
post: bent(
"POST",
"https://api.didomi.io/v1",
"json",
{
Authorization: `Bearer ${token}`,
},
201
),
};
(async () => {
console.log(
`Creating a notice for organization ${organizationId} ...`
);
const notice = await client.post("/widgets/notices", {
organization_id: organizationId,
name: "My consent notice",
});
console.log(`Notice with ID ${notice.id} created!`);
})();Modify the notice configuration
Get the ID of the draft configuration
Modify the draft configuration
Publish the notice
What's next?
Last updated