---
schema_version: "1"
id: 9098fce95e827763f653aeef8328c8c574b04af5e9987b34adb45d0960d3b3fb
title: Sample Configuration File
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-api/guides/miaw-sample-web-app.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-api/guide/miaw-sample-web-app.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5e9f998ea2ebd4a3132d8f3397ffb727b797865c01ec7464828bbec0d4bfbe60
products:
  - Enhanced Chat API
  - Service Cloud Developer Content
---
# Sample Configuration File

The following sample configuration contains the features that are configured in the Enhanced Chat API setup. Salesforce uses the configuration to validate the request.

The configuration is returned in the context.configuration field when you [Generate an Access Token](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForAuthenticatedUser), and when you [Generate an Access Token for an Unauthenticated User](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForUnauthenticatedUser).

You can also use the configuration to see which features are configured and determine the dynamic behavior of the client UI.

```json
{
  "embeddedServiceConfig": {
    "name": "ES03",
    "deploymentType": "api",
    "embeddedServiceMessagingChannel": {
        "channelAddressIdentifier": "",
        "AuthMode": "UnAuth"  // enum: Auth / UnAuth
    },
    "forms": [
      {
        "formType": "PreChat",
        "displayContext": "Conversation",
        "formFields": [
          {
            "name": "_firstName",
            "order": -1,
            "type": "Text",
            "required": true,
            "maxLength": 40,
            "isHidden": true
          },
          {
            "name": "subject",
            "order": 1,
            "type": "Text",
            "required": true,
            "maxLength": 80,
            "isHidden": false
          },
          {
            "name": "FavoriteFood",
            "order": 2,
            "type": "ChoiceList",
            "required": false,
            "maxLength": 20,
            "choiceListId": "133Z7000000000D",
            "isHidden": false
          }
        ]
      }
    ],
    choiceListConfig: {
      "choiceList": [
        {
          "choiceListId": "132Z7000000000B",
          "choiceListValues": [
            {
              "choiceListValueName": "Pizza",
              "choiceListValueId": "133Z7000000000B"
            },
            {
              "choiceListValueName": "Sandwich",
              "choiceListValueId": "133Z7000000000C"
            },
            {
              "choiceListValueName": "Taco",
              "choiceListValueId": "133Z7000000000D"
            }
          ]
        }
      ]
    }
    "attachments": {
      "endUserToAgent": true,
      "maxFileSize": 5242880,
      "allowedFileTypes": {
        "image": ["png", "bmp", "tiff", "gif"],
        "audio": [],
        "video": ["mp4"],
        "text": ["csv", "txt"],
        "other": ["xml", "xls", "xlsx"]
      }
    }
    "transcript": {
      "allowTranscriptDownload": true
    }
  },
  "timestamp": 1658254814991
}
```
