Configure tokenization
Provider contract
A token provider implements two asynchronous batch methods:tokenize_batch(scope, items)/tokenizeBatch(scope, items)restore_batch(scope, items)/restoreBatch(scope, items)
id, the exact_value, and
the configured token_ref. Return the same id, opaque payload bytes, and a
concrete resolved profile version.
Each restoration item contains an id, token_ref, resolved version, and
opaque payload. Return the same id and restored value.
Python round trip
Node.js round trip
Atomic and non-recursive behavior
- Repeated source values are separate tokenization items and may receive different tokens.
- Identical envelopes are deduplicated before restoration provider calls.
- Every canonical token in the supplied text is restored, or no result is returned.
- Nested tokenization and recursive restoration are rejected.
- Partial restoration and ignore-failure modes are not available.
DFTOKENv1(<body-length>):<ref>.<version>.<payload> form with unpadded
Base64URL components. Treat the envelope as opaque application data; do not
parse or construct it yourself.
Browser/WASM rejects selected tokenization and every restoration call with
unsupported_strategy.