# Setup

### **Step 1 - Add the gramchat javascript to your website**

```markup
<script src="https://static.gramchat.me/gram.js"></script>
<script>window.onload = function () {
      gram = window.Gram.initialize({
        apiKey: "[API KEY]",
        locales: {
          title: "[Chat Window Name]",
          name: "[Chat Agent Name]"
        },
      });
    }
</script>
```

### **Step 2 - Add gramchat to your telegram**

#### \[Recommended] Automatic setup

In your purchase email will be two links. One for adding the bot to your personal telegram, the other one for adding it to a group.

Just click on the link on your phone and the bot will automatically be added to your Telegram.

{% hint style="info" %}
The link will look like following:

[https://telegram.me/gramchat\_me\_bot?startgroup=](https://telegram.me/gramchat_me_bot?startgroup={{11.api_key}}00100{{11.secret}})`[YOUR APIKEY]`[00100](https://telegram.me/gramchat_me_bot?startgroup={{11.api_key}}00100{{11.secret}})`[YOUR APISECRET]`
{% endhint %}

#### Manual setup

1. Create a group
2. Add new user & search for the bot "gramchat\_me\_bot"
3. Add the bot
4. Send your APIKEY and APISECRET as setup message. The setup message needs following format `/start [YOUR APIKEY]00100[YOUR APISECRET]`

### **Step 3 -Make the gramchat bot an admin of the group**

1. Open group settings
2. Click on the three dots and click on `Select admins`
3. Set the bot as admin

{% hint style="info" %}
The bot will also work without admin rights, but your chat messages will be way more over clear with the bot as admin. (As we can remove unused messages)
{% endhint %}
