# Hermes DM Pairing

> A way to let a new person use Hermes with a code, not a list.

**Field:** Artificial Intelligence  
**Category:** Hermes Agent  
**Also known as:** hermes pairing approve, Hermes pairing code

## Think of it like

It is like a door code a friend reads to you, so you let them in.

## Definition

DM pairing is the Hermes Agent way to let a new person use the bot without typing their user ID into a list. When someone unknown messages the bot, they get a one-time pairing code. You approve them with hermes pairing approve, the app name and the code. Codes expire after one hour. Email senders are ignored unless email pairing is turned on.

## Example

Mia's teammate messages the team bot and gets a code. He sends it to Mia, she approves it, and he can chat.

## Example code

```console
hermes pairing approve telegram XKGH5N7P
```

Let in the person who got this code.

## Why it matters

Finding a user ID is fiddly. A code lets you add a person in seconds and still stay in control.

## Common mistake

Approving a code someone you do not know sent you. Pairing gives them your bot's full reach.

## Three principles

- **One-time code.** On first message.
- **You approve it.** hermes pairing approve.
- **Expires in an hour.** Rate limited.

## Related terms

- [Hermes Gateway Allowlist](https://learn.benibix.com/term/ai/hermes-gateway-allowlist)
- [Hermes Messaging Gateway](https://learn.benibix.com/term/ai/hermes-gateway)

## Told apart from

- [Hermes Allowlist vs DM Pairing](https://learn.benibix.com/compare/hermes-gateway-allowlist-vs-hermes-dm-pairing): People think the allowlist and DM pairing are two rival safety modes. They are two ways to fill the same guest list. With the allowlist, you type each user ID into the .env file. With pairing, a new person messages the bot, gets a one-time code, and you approve it. Use the list for a fixed team, and pairing to add people one by one.

---

Source: https://learn.benibix.com/term/ai/hermes-dm-pairing
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
