Skip to content
DocsMenu

Can I use a live key on localhost?

View as Markdown

Open this page inChatGPTClaudeCursor

No, a live key cannot run a signing flow on localhost. Esign Comply accepts a live session only when context.url is inside your verified registered domain, and live browser calls only from that domain. A session that names http://localhost is refused with 403 domain_mismatch. Use a test key on localhost.

What does a live key check that a test key does not?

Check Live key Test key
The domain Verified. Otherwise 403 domain_not_verified. No domain needed
context.url on POST /v1/sessions Required, and inside the registered domain Optional. localhost, 127.0.0.1, the registered domain or a listed preview host
Origin of a browser call Inside the registered domain. A call with no Origin is refused. The same hosts as context.url. A call with no Origin is accepted.

A live request that fails the second or third check returns 403 domain_mismatch.

Can a script on my machine call the API with a live key?

Yes. Requests made with a secret key are not checked against a host, so a script on your machine can read live records or call GET /v1/usage. The domain rule applies to context.url and to the browser calls made with a session's client token. Keep the live key in your production environment, and give a reporting script its own read_only key.

How do I test the whole flow on localhost?

Use a test key. Test keys work on localhost, *.localhost, 127.0.0.1 and [::1], on any port, before you register a domain. A test record goes through the same sealing steps on a separate test ledger and carries livemode: false. Test records are deleted after 30 days.

Where can I try a live signature before launch?

On your registered domain or any of its subdomains, for example a staging subdomain. Registering app.example.com covers example.com and every subdomain. A live signature there is a real record and counts as one signature event.

Last updated · API version 2026-11-21