Documentation Index
Fetch the complete documentation index at: https://docs.legitimuz.com/llms.txt
Use this file to discover all available pages before exploring further.
Responsible for mounting the SDK and should be called after the configuration.Example:<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script type="text/javascript">
const sdkInstance = LegitimuzFaceIndex({
/* ...options */
});
// Mount SDK
sdkInstance.mount();
</script>
setLang
function(lang: 'pt' | 'en' | 'es'): void
Responsible for changing the language of the Face Index flow.Example:<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script type="text/javascript">
const sdkInstance = LegitimuzFaceIndex({
/* ...options */
});
// Mount SDK
sdkInstance.mount();
// Change language
sdkInstance.setLang('en');
</script>
Responsible for closing the Face Index modal.Example:<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script type="text/javascript">
const sdkInstance = LegitimuzFaceIndex({
/* ...options */
});
// Mount SDK
sdkInstance.mount();
// Close verification modal
sdkInstance.closeModal();
</script>
changeFieldId
function(params: object): void
Change the id
of the field used to extract the CPF.
Name of the fieldClick here to see the available fields New id of the fieldExample: my-custom-id
Example:<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script type="text/javascript">
const sdkInstance = LegitimuzFaceIndex({
/* ...options */
});
// Mount SDK
sdkInstance.mount();
// Change CPF field id
sdkInstance.changeFieldId({
fieldName: "cpf",
fieldId: "my-custom-id",
});
</script>
startFaceIndex
function(params: object): void
Start the Face Index flow via JavaScript.
User’s CPFExample: 12345678901Click here to see the available fields referenceId
string | null
default:"null"
Field used for custom identifiersExample: fake-user-id
Example:<div id="legitimuz-root"></div>
<script src="https://cdn.legitimuz.com/js/sdk/faceindex.js"></script>
<script type="text/javascript">
const sdkInstance = LegitimuzFaceIndex({
/* ...options */
});
// Mount SDK
sdkInstance.mount();
sdkInstance.startFaceIndex({ cpf: "12345678901" });
</script>