For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chat Without Logging In Using a Contact Source ID

Let users who are already signed in to your website chat directly with their own user ID (Source ID), without signing in again. The platform maps this ID to a contact, and requests not signed by your

When you embed Web Chat on your own website, users have often already signed in to your site. This setting lets them start chatting directly with the user ID from your system, without going through another login screen, while the public chat URL still blocks anonymous access.

In MaiAgent, this ID is called the Source ID, and both the admin console and the embed script use this name. When the platform receives a Source ID, it maps it to (or creates) a contact, and that user's conversation history is attached to this contact.

1. What This Setting Solves

Before this setting existed, the login setting was an either-or choice:

  • Login setting on: Even though the embedding side has already verified the user's identity, the user is still asked to sign in again.

  • Login setting off: Anyone can use the public chat URL anonymously.

With this setting on, both can hold at the same time: users who arrive with a Source ID and a valid signature chat directly, and visits without them are always redirected to the login page.

This setting is off by default. When it is off, all existing behavior remains completely unchanged.

2. Enable the Setting

Where to find it: In the left menu, go to "Customer Service > Chat Platforms", select a website-type chat platform, and open the "Login Settings" tab.

1. Select a login source first

This switch depends on the login settings. You must first select a source under "Login Source" (MaiAgent/AD/Keycloak/LINE). Until a source is selected, the switch cannot be clicked, and the screen displays "Please select a login source first".

Login Settings tab; this switch is off by default

2. Turn on the switch

Turn on "Allow the embedding side to chat without login using a Source ID". Only after it is on do the verification mode, signing secret, and integration examples appear.

The settings section that expands after enabling; the verification mode defaults to "Require signature verification"

3. Choose a verification mode

Verification mode
Description
Suitable for

Require signature verification (recommended)

The embedding side must attach a signature calculated by your backend, and access is granted only if the signature is valid. Only a server holding the secret can start a conversation on behalf of a user.

Production environments

Source ID only

No signature is verified; any request with a Source ID is allowed through.

Testing or closed internal networks

When "Source ID only" is selected, a red risk warning is displayed

4. Get the signing secret

After you select signature mode and save the settings, the platform generates a signing secret. In the secret field, you can:

  • Click "Show" to view the full secret (masked by default)

  • Click "Copy" to hand it to your engineers

  • Click "Regenerate" to issue a new secret

5. Set the signature validity period

You can choose 1, 5, or 15 minutes, with 5 minutes as the default. Expired or already used signatures are rejected.

Signing secret, signature validity period, integration examples, and behavior preview

The validity period limits how long a signature can be used to open a conversation; it is not how long the conversation lasts. Once a user has obtained an identity and is chatting, they are not signed out after 5 minutes.

3. How Your Engineers Integrate

The "Integration Examples" section in the admin console is pre-filled with this chat platform's identifier and provides examples for the backend signature calculation (PHP/Node/Python) and the frontend setup, which you can copy and hand to your engineers. For the full details of the signature algorithm, verification rules, and SDK parameters, ask your engineers to refer to Web Chat Embedding and SDK › Signature Verification in the technical manual.

1. Calculate the signature in the backend

Each time before a user enters a conversation, your backend uses the signing secret to calculate a timestamp ts and a signature sig. For the algorithm and examples in three languages, see Signature Verification in the technical manual.

2. Pass them to the embed script in the frontend

The frontend passes the Source ID, together with the ts and sig calculated by the backend, to the embed script:

You can also write them directly in the auth field of the embed configuration, and the embed script picks them up automatically after loading. See the technical manual for the syntax.

3. Integration notes

  • Sign anew on every entry: A signature can be used successfully only once, so the embedding side must not cache signatures.

  • Calculate the signature in the backend: Once the secret appears in frontend code, it is effectively public.

  • Keep clocks accurate: The system allows a clock skew of 60 seconds; timestamps outside this range are rejected.

  • Use the correct chat platform identifier: The signature includes the chat platform identifier, so a signature calculated with another chat platform's identifier does not pass.

4. Behavior Reference

Incoming request
Result

Source ID + valid signature

Chats directly; no login screen appears

Source ID with an invalid or expired signature

Rejected

The same signature used repeatedly

The first use succeeds; the second is rejected

No Source ID (including opening the public URL directly)

Redirected to the login page

Verification mode is "Source ID only" + Source ID

Chats directly; no signature is verified

This switch is off

Keeps the original login setting behavior

All rejection scenarios return the same external response, without revealing the reason for failure or whether a given Source ID exists. The reason appears only in the admin console's verification failure log.

5. Verification Failure Log

If the integration does not work smoothly, click "View verification failure log" in the settings section to see recent failure events, so your engineers can troubleshoot on their own. The log does not contain the secret or the full signature.

The expanded verification failure log
Reason
Common causes

Signature expired

Server clock drift, or the embedding side cached the signature

Timestamp beyond the allowed future range

The server clock is more than 60 seconds ahead

Signature mismatch (the secret may be inconsistent)

The backend uses a different secret from the admin console, or the signature string is constructed incorrectly

Missing timestamp or signature

The embedding side did not send ts or sig

Signature already used

The same signature was sent a second time

Replay-protection cache unavailable

A temporary condition on the platform side; the system rejects rather than allows the request

Source ID maps to multiple contacts

Duplicate contact records with the same Source ID exist on that chat platform

6. FAQ

If the signature validity period expires, is the user's conversation interrupted?

No. The validity period only limits how long a signature can be used to obtain an identity. Once the identity is obtained, the conversation's lifetime follows the existing Web Chat mechanism and is not affected by the signature period.

Can the same Source ID map to multiple contacts?

Within the same chat platform, one Source ID maps to only one contact. If the same Source ID is used on multiple chat platforms, each platform has its own contact, and the conversation histories are independent of each other.

Does enabling this setting affect existing embeds?

This setting is off by default, and the behavior of existing chat platforms is completely unchanged. If you choose signature mode after enabling it, requests without ts and sig are redirected to the login page, so confirm with your engineers that the embedding side has been updated before you enable it.

After a user signs out of my website, can they continue chatting?

A user who has already obtained an identity can continue that conversation. What you control is the issuing side: once a user signs out, you stop issuing new signatures, so they can no longer obtain an identity. If you need "sign-out takes effect immediately", please contact us, and we will evaluate a separate approach.

When a user arrives with a Source ID, does the AI include their login credentials when calling tools?

No. "Call tools with the Keycloak login identity" applies only to visitors who actually signed in with Keycloak. The identity is based on the organization member bound when the conversation was created, and the Source ID passed in by the embedding side is not used, so a Source ID cannot be used to impersonate someone else's credentials. If your tool needs to identify the user, you can use Keycloak login together with that feature, or set up MCP credentials for the contact.

Last updated

Was this helpful?