Understand secure public token generation | Pixie CRM Help Centre Canonical: https://pixiecrm.com/help-centre/understand-secure-public-token-generation Publisher: Pixie Technologies LLC Module setup, access and architecture Understand secure public token generation Pixie CRM guidance. Follow the route for your workspace, check your role and enabled modules, and verify the result before moving on. This guide explains how the module creates the 64-character public token used by email and QR links. Audience: Administrators, security reviewers and auditors; Permission: Delivery Note: View; Module v1.0.0; Where to goNo staff action → Token is generated automatically when a delivery note is created What this guide helps you do Understand how the module creates the 64-character public token used by email and QR links. This guide follows the supplied Delivery Note module’s live hooks, controller actions, model rules, views and stored side effects. Follow these steps - Create a delivery note through a supported flow. - Go to its admin detail page and use the generated secure link. - Check that the token is not displayed in list views or exposed as a predictable sequence. - Treat the URL as access-sensitive evidence. Fields and options - Primary source: `random_bytes(32)` encoded as 64 hexadecimal characters - Fallback: OpenSSL secure pseudo-random bytes - Final compatibility fallback: SHA-256 over unique/random inputs Rules and limits - The database enforces token uniqueness. - The supplied code does not implement token expiry, rotation or revocation. - Voiding the note blocks public access even though the token remains stored. - Signing changes the record to sealed read-only behaviour but retains the link for viewing. - The final `uniqid`/`mt_rand` compatibility fallback is weaker than `random_bytes`; supported production PHP 7.4+ should use the primary `random_bytes` branch. Check it worked - Recipients receive an unguessable public URL tied to one delivery note. Safety checks and troubleshooting - Because the link acts as a bearer secret, share it only with the intended recipient. Stay within the supported flowDo not force database values, expose secure tokens, bypass permission checks, replace a stored signature or invent a status or interface that the supplied code does not implement. Related guides Understand invoice and item snapshot data (https://pixiecrm.com/help-centre/understand-invoice-and-item-snapshot-data)Understand Delivery Note reference numbering (https://pixiecrm.com/help-centre/understand-delivery-note-reference-numbering)Understand Delivery Note asset and hook scoping (https://pixiecrm.com/help-centre/understand-delivery-note-asset-and-hook-scoping)Browse all Delivery Note guides (https://pixiecrm.com/help-centre/category/delivery-note)