Document Reading
The document reading SDK allows you to access document reading processes and time user interactions with the document to report reading times for each page individually.
This SDK has security measures that prohibit access to the document if it is private through OTP code validation using the distribution method selected when creating the process, either WhatsApp or email.
If the process is public, anyone can access the document with the link. The only necessary step the user must complete before accessing the reading process is to enter their email address, which will identify them in the reading metrics.
Integration Example
For the integration, it is necessary to have an <iframe id='iframeId'>
element where the SDK will be rendered, and the AucoSDK function must be provided with the ID of this element.
Follow the link to see the reference of the events required for an SDK integration: 👉🏻 Events
import { AucoSDK } from 'auco-sdk-integration';
const unsubscribe = AucoSDK({
iframeId: 'iframeId',
sdkType: 'sign',
language: 'es', // Accepted language 'es' | 'en'
events: {
onSDKReady,
onSDKClose,
onSDKToken,
},
sdkData: {
document: 'WO0J4L3YWB', // Reading process code
signFlow: 'read',
email: 'reader@auco.ai', // Optional: Reader email if it is necessary to skip the OTP validation step
uxOptions: {
primaryColor: '#021c30',
alternateColor: '#a557f2',
},
},
env: process.env.PUBLIC_ENVIRONMENT === 'dev' ? 'DEV' : 'PROD',
});
If the reader's email is configured in a private process, it will be validated against the list of people who have access. If an email is configured for someone who doesn't have access to the document, the SDK will display an error message, and they won't be able to access it.
The reader's email field is designed with session management in app.auco.ai in mind. Therefore, if the email is included, it's also necessary to configure the onSDKToken event, which must return a valid user token.