files/en-us/web/api/private_state_token_api/index.md
{{DefaultAPISidebar("Private State Token API")}}{{SeeCompatTable}}
The Private State Token API provides a mechanism for conveying trust in a user's authenticity from one browsing context to another, without sharing the user's identity or allowing their activity across websites to be tracked.
To prevent fraud on the web, websites and services need to establish and convey trust signals that prove a user is who they say they are, and is not a bot pretending to be a human or a malicious third party defrauding a real person or service.
Unfortunately, current cookie-based techniques for conveying such information are not secure and can be used for {{glossary("fingerprinting")}} and tracking users, which is problematic for user privacy.
Private state tokens solve this problem, allowing trust signals to be conveyed across origins without passive tracking using the Privacy Pass protocol in the background.
[!NOTE] Private state tokens are not a replacement for CAPTCHAs or other trust-establishing mechanisms. Private state tokens provide a way to convey trust in a user, not establish trust in a user.
Private state tokens are encrypted, so it isn't possible to identify an individual or connect trusted and untrusted instances to discover user identity.
See Using the Private State Token API for a guide to using private state tokens.
The Private State Token API has no distinct interfaces of its own.
<iframe> privateToken attribute.privateToken option
privateToken option specified initiate operations such as issuing or redeeming tokens.XMLHttpRequest call, to initiate private state token operations.privateToken attribute
token-request operations.token-redemption and send-redemption-record operations.send-redemption-record fetch request is made.Private state token token-request operations are controlled by the {{httpheader('Permissions-Policy/private-state-token-issuance','private-state-token-issuance')}} {{httpheader("Permissions-Policy")}} directive, whereas token-redemption and send-redemption-record operations are controlled by the {{httpheader('Permissions-Policy/private-state-token-redemption','private-state-token-redemption')}} directive.
Specifically, where a defined policy blocks usage, any attempts to initiate private state token operations via fetch requests will fail.
See the Private State Token Demo Issuer for an example implementation.
{{specifications}}
{{Compat}}