Form key and session key

Two different keys

A form URL can carry two distinct tokens. They do different jobs and are easy to confuse.

The Form Key

The Form Key is a secure, opaque string passed as the key URL parameter. It is resolved server side and carries:

When the form loads, the values in the key are used in place of separate id, recordId and versionId parameters.

Why use it

Use a Form Key instead of plain parameters when you do not want to expose Salesforce record ids in a shareable link, or when you want the link to carry its own expiry. This is the recommended way to send a form to an external recipient tied to a specific record.

Generating a Form Key

The Form Key can be generated three ways:

The default validity is 1440 minutes (24 hours) when not specified.

A generated link looks like:

https://your-site.example.com/apex/b3f__Form?key=<formKey>

The session key

The session key is a short-lived signed token issued automatically on each page load. The running form uses it when calling the AI proxy or the large file storage service.

The session key authenticates the caller. It does not select a form. The intended session length is held in the Authorization Session Length general setting (seconds, default 3600).

Which to use