onStatusChange (Response callback)
for CDN version:
privo.ageEstimation.onStatusChange(event => {})
for NPM version:
getInstance().onStatusChange(event => {})
It returns:
interface AgeEstimationEvent {
status: "completed" | "cancelled";
token?: string;
}
Example of real data:
{
"status": "completed",
"token":"9ede0f0-...a78",
}
The method is invoked by the "Run" methods to handle status change results after "Run".
Parameters:
status - Current status of the age estimation request. Can be "completed" or "cancelled".
token - Age Estimation token that contains encoded age information about the user. Token decoding info - doc