Skip to content

Instantly share code, notes, and snippets.

@mb8z
Last active July 28, 2021 23:10
Show Gist options
  • Save mb8z/3389285f259cdea808c9c37ae3565c60 to your computer and use it in GitHub Desktop.
Save mb8z/3389285f259cdea808c9c37ae3565c60 to your computer and use it in GitHub Desktop.
const useDocty = require('@usedocty/node');
const Docty = useDocty('{{API_KEY}}');
const example = async () => {
const consents = await Docty.Consents.add([
{ user: 'john.doe@example.com', document: 'document1-example-uuid-here' },
{ user: 'john.doe@example.com', document: 'document2-example-uuid-here' },
{ user: 'another.user@example.com', document: 'document1-example-uuid-here' },
{ user: 'another.user@example.com', document: 'document2-example-uuid-here' },
]);
console.log('Consents:', consents);
};
example();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment