identify method

Future<IdentifyResult> identify({
  1. String? tag,
  2. bool automatic = false,
})

Collect and submit a single-pass v: 3 identification.

Returns the server's answer, not a receipt for one. When IdentifyResult.identifiable is false, IdentifyResult.visitorId is "" and IdentifyResult.visitorIsNew is false (Option B). To inspect local device signals without submitting to the server, call collect.

Pass automatic: true for a call the app makes on its own rather than in answer to the user (on start, on a timer, on returning to the foreground). An automatic call joins an identification already in flight instead of starting another, and waits out a transient failure instead of repeating it at once.

Throws FingerlyConsentException while consent is not granted.

Implementation

Future<IdentifyResult> identify({
  String? tag,
  bool automatic = false,
}) async {
  final raw = await _invoke<String>('identify', {
    'tag': tag,
    'submit': true,
    'automatic': automatic,
  });
  return IdentifyResult.fromJson(_decode(raw));
}