> This page is for version Scripted.
> For other versions, use one of these documentation indexes:
> - Generative (default): https://developers.ada.cx/generative/llms.txt
> - Scripted: https://developers.ada.cx/scripted/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.ada.cx/_mcp/server.

# Protect chatter data using verification and authentication

In some Answer flows, you may either serve chatters with sensitive data,
or give them the chance to make changes to their account, orders,
bookings, etc. In these cases, you want to make sure that the chatter is
who they say they are first.

Verification and authentication are two methods that you can use, either
alone or in conjunction with each other, to make sure you're not letting
just anyone access or modify sensitive data:

* **Verification** is the confirmation that a piece of data the chatter
  provides (name, email, phone number, etc.) matches the value in your
  database.

* **Authentication** is the confirmation that the chatter is the person
  they claim to be, by asking them to sign into an account.

The approach you use depends on the sensitivity of the data or actions
the chatter wants to access or perform. The higher the risk of data
getting compromised, the stricter the verification and/or authentication
processes should be.

## Use verification to match chatter and database values\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4616913241601633468121020486]

There are two use cases for using verification:

* When the chatter wants to access low-risk information, you can use
  verification on its own.

* When the chatter wants to access higher-risk information, you can use
  verification in addition to authentication.

As a best practice, when you're using verification, you should make sure
the chatter has two pieces of identifying information before giving them
the information they're looking for. Identifying information can include
things like:

* Email

* ZIP/postal code

* Account number

* Order number

* One-time password

### Set up a verification process\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4636052182886433468163894695]

Verification setup varies depending on the type of process you want to
implement. However, it often looks something like:

1. Get one or two pieces of information associated with the person you
   want to verify already saved in a variable. This information can
   come from an API, or from metaFields. For more information, see
   [metaFields](https://developers.ada.cx/reference/embed2-reference#metafields)
   in Ada's developer documentation.

2. Using a [Capture block](/scripted/docs/build-and-maintain-your-bot/work-with-blocks-and-apps/save-chatter-information-using-the-capture-block),
   ask the chatter to provide the information it already has.

   ![](/_fern-files/_img/7d900872b861ba84ac38e8dedc4fadb18e0da49d461ed5018bf35b201187781e.webp)

3. Using a [Conditional block](/scripted/docs/build-and-maintain-your-bot/work-with-blocks-and-apps/target-content-to-chatters-using-the-conditional-block),
   verify whether the information the chatter provided matches the
   information your bot has. Then, create responses for both successful
   and unsuccessful matches.

   ![](/_fern-files/_img/324134622100f8dabfa42170dab7e9b0f36c319c5e728c8ef02737d3fe94ef97.webp)

After configuring your Answer flow this way, the bot only provides the
info the chatter is looking for if those values match.

![](/_fern-files/_img/81d63ba0ac9d7541b5da338e0dec55f1e35c60acec7066bd17d2aeedcc67932f.webp)

## Use authentication to confirm a chatter's identity\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4487416902462433468196965559]

When chatters want to access sensitive information, or perform sensitive
actions like making purchases, authentication is the best way to ensure
the right person is doing it.

After authentication, you can also add verification to add an additional
layer of security.

### Set up an authentication process\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4497950515750433469145172328]

There are three ways we typically set up authentication. The method
that's right for you might vary based on how your website works, but all
of them accomplish the same general function: after the chatter
authenticates, Ada saves an access token that you can then use in
sensitive API calls. In all of these below cases, you'll see that
authentication tokens either automatically expire or are saved in the
[Token Vault](/scripted/docs/integrate-ada-with-other-tools/securely-store-api-tokens-using-the-token-vault)
to keep them secure.

#### Authenticate using the Sign In block\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm463923928289443346915364816]

Ada has a built-in method of authenticating chatters. For information on
how to configure authentication this way, see [Let chatters sign into your website](/scripted/docs/use-ada-with-your-website/serve-your-website-information-in-chat/let-chatters-sign-into-your-website).

When a chatter signs in using this block, it saves a temporary token
that you can use in the header in the API call where you request
information, as pictured below. This access token expires within a set
time limit, which is determined by the authentication holder/client, or
at the end of a conversation - whichever comes first.

![](/_fern-files/_img/f60184f95d80549cee7a1ed6b6743094b838ffea0a0f3b76ccde89da96c23641.webp)

#### Authenticate using a custom setup\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4636051906110433469210855739]

If the Sign In block approach doesn't work for your authentication
method, you can work with your Ada team to create a custom method to
save your chatter's access token. Typically, there would be two ways we
would handle this token:

* Store the token in the [Token Vault](/scripted/docs/integrate-ada-with-other-tools/securely-store-api-tokens-using-the-token-vault),
  and then access it using a token variable

* Pass the token to the bot using sensitive
  [metaFields](https://developers.ada.cx/reference/embed2-reference#metafields)
  in Embed

#### Authenticate server-to-server\[#UUID-0f3d5f8a-40a2-5679-1fc4-61cb1ed13cfb_section-idm4639239264505633469219861109]

Another option to authenticate chatters is to store static credentials
in a token variable.

1. Format the credentials as follows, where the email is followed by
   the password, separated by a colon: `example@ada.support:p@ssW0rd`.

2. Encode that string into Base64. In this case, our encoded value is
   `ZXhhbXBsZUBhZGEuc3VwcG9ydDpwQHNzVzByZA==`. Then, save that string
   in the Token Vault.

3. When creating your API call, in the header, make sure you precede
   the token with "Basic" and use a sensitive variable to populate it.

In this case, the token is static and doesn't expire, but it will stop
working if the account credentials change (for example, if the password
expires).

![](/_fern-files/_img/8b99be2fb1efd3c350d1cd8ca4c4b224d4ff9fd7b83cacff692a4eb7a1ba56e6.webp)

---

Have any questions? Contact your Ada team, or email us at [](<mailto:help@ada.support%20%E2%80%9CHelp Docs inquiry%E2%80%9D>).