> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algoreg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Started

> Integrate Algoreg Go!Chat in your own application

## Process overview

Go!Chat is a KYC/KYT oriented communication channel between you and your customers. If Go!Chat works with emails (IMAP/SMTP) it can also be embedded in your application using a simple iframe or redirection.

There is an overview of a basic integration workflow with Go!Chat.

<AccordionGroup>
  <Accordion title="Get an initial token for the customer" icon="circle-1">
    Generate an Go!Chat token the customer (see [API
    reference](/api-reference/go-chat/create-end-user-token))
  </Accordion>

  <Accordion title="Redirect the customer or show Go!Chat in an iframe" icon="circle-2">
    Once you have the token, simply let the customer to the right url to display
    Go!Chat.
  </Accordion>
</AccordionGroup>

## Prerequisites

To use Go!Chat, first check that you have access to this product on the Algoreg backoffice, you can verify this in the billing page.

## About the token generation and options

#### Emails and customer ids

You can generate a end user token using several method:

1. Using one or several emails: In this case all threads and emails for this email will be displayed. Think of it like an email client for this specific email.

2. Using a customer external id: In this case we'll display all the thread related to this customer. If multiple customers share the same email, they will not see threads from other customers.

3. Both: in this case we will restrict first to the customer, then to the emails.

#### Other options

* From: can be used to specify exactly who sent the message. Every emails of the customer or if defined of the emails field will receive an acknowledgement email.
* Tags: tags the user can use to select a category when creating a thread. Use the "" (empty string) tag to allow the user to create a thread without category.

## Integration

After generating the session you will get a `token` string that you can use as described bellow either in an iframe or redirection.

### Use a redirection

Simply redirect the user to the following url:

```
https://chat.algoreg.com/?token={token}
# Or https://chat.{instance}.algoreg.com/?token={token} if you're using a custom instance
```

### Use an iframe

The integration is using the same url than the redirection.

```jsx theme={null}
<iframe src="https://chat.algoreg.com/?token={token}" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" />
```

## Session customization and accessibility

you can specify some parameters directly into the url.

<ParamField path="theme" type="string">
  `auto`,`light` or `dark`. Set the theme brightness. Use "auto" for automatic
  theme detection, "light" for a light theme, or "dark" for a dark theme.
</ParamField>

<ParamField path="powered_by" type="string">
  0 or 1. Enable the display of a block with your Algoreg Logo
</ParamField>

<script type="application/javascript">document.body.style.opacity = 0;</script>

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/decrypt.js" />

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/text-replace.js" />
