# SMS

## What it is

The **SMS** channel sends and receives short text messages through a provider (**Twilio** or **SMS.ru**). People text your number; Botconsole runs the constructor scenario and can continue the dialogue by SMS.

SMS is the most limited channel: **text only**, paid per segment, and no media or buttons.

## Requirements

- A **constructor bot** in Botconsole  
- A Twilio account **or** SMS.ru account with a sender number / credentials  
- Ability to set the **webhook URL** in the provider cabinet  

> SMS usually costs money per message segment. Budget for testing and production traffic.

## How to connect

1. Open **Bots** → your bot → **Settings**.
2. **Add connection** → **SMS**.
3. Copy the **Webhook URL** into Twilio / SMS.ru inbound settings.
4. Choose provider:
   - **Twilio** — Account SID, Auth Token, From number  
   - **SMS.ru** — api_id and number  
5. Save. Status should show credentials are complete.
6. Send a test SMS to your number — the scenario should reply by SMS.

## Message types and limits

### Available message types

| Type | Supported |
|------|-----------|
| Text | **Yes — only this** |
| Image, video, audio, document, stickers, location, poll, buttons as UI | **No** |

### Buttons

- **Not supported**  
- If you need choices, write them in the text, for example:  
  `Reply 1 — Support, 2 — Sales`  
  or send a short link to a form / website  

### Extra message options

| Option | Available |
|--------|-----------|
| Message effects | No |
| Reply to message | No |
| Streaming / typing | No |
| Attachments | No |
| Edit / delete | No |

### Limits

| Limit | Guidance |
|-------|----------|
| Practical max length | about **420** characters (~6 segments with Cyrillic) |
| Latin (GSM) segment | ~**160** characters |
| Cyrillic (UCS-2) segment | ~**70** characters |
| Long SMS | split into several billable segments |

> Keep answers short. Long constructor texts will be expensive and may be truncated by policy.

## Formatting

**Plain text only.** No bold, italics, or Markdown. Emojis count toward length and may change segment size.

## Notes and limitations

> **STOP / unsubscribe.** Words like `STOP`, `Стоп`, `unsubscribe`, `отписаться` unsubscribe the contact — respect local marketing rules.

> For marketing SMS you generally need **opt-in** consent. Support/transactional replies are different from mass ads.

> Design scenarios specifically for SMS: short steps, clear questions, no reliance on buttons or images.

> Delivery depends on the operator and the provider; international routes may have extra restrictions.
