Skip to main content
The widget keeps a visitor’s conversation across page loads and return visits. It does this with two tokens that it stores in the visitor’s browser.

Tokens

Each time the visitor resumes, the resume token gets a new 30-day lifetime.

Where the widget stores them

The widget saves both tokens under the key paperlink-widget-session:<hash>. The hash depends on the API origin and the start of the API key, so two bots on one page keep separate sessions. The widget uses the first storage that works:
  1. localStorage
  2. sessionStorage
  3. Memory, which lasts until the visitor leaves the page
To clear the session in code, call resetSession() on the widget instance. The next message starts a new conversation.

What the widget restores

When the visitor opens the widget, it loads the latest messages of the conversation. The historyLimit option sets how many. The default is 20, and the server accepts 1 to 100. If the session token expired, the widget uses the resume token to get a new one. This step needs no Turnstile check.

Conversation retention

Widget conversations stay while the workspace is active. Email support@paperlinkai.com to delete them.

Privacy and cookies

The widget sets no cookies. The Turnstile check is Cloudflare’s own and follows Cloudflare’s privacy terms. The browser storage holds opaque tokens only, and no message text. Use this information in your cookie policy.

Error states and copy

See what visitors read when something goes wrong.