Skip to content

Commit c3b8184

Browse files
authored
Merge pull request #83 from fingerprintjs/add-timeout-documentation
docs(README): add how to specify a custom timeout block
2 parents af51339 + 66fb0bd commit c3b8184

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,22 @@ void identify() async {
176176
}
177177
```
178178

179+
### Specifying a custom timeout
180+
181+
*Default timeout value:*
182+
- iOS: 60 seconds
183+
- Android: not specified
184+
- Web: 10 seconds
185+
186+
You can override the default timeout with a custom value of your choice. If the `getVisitorId()` or `getVisitorData()` call does not complete within the specified (or default) timeout, you will receive a `ClientTimeoutError` error.
187+
188+
```dart
189+
void identify() async {
190+
visitorId = await FpjsProPlugin.getVisitorId(timeoutMs: 10000);
191+
deviceData = await FpjsProPlugin.getVisitorData(timeoutMs: 10000);
192+
}
193+
```
194+
179195
## Additional Resources
180196
- [Server-to-Server API](https://dev.fingerprint.com/docs/server-api)
181197
- [Fingerprint Pro documentation](https://dev.fingerprint.com/docs)

0 commit comments

Comments
 (0)