Cordice Developers Open Cordice
Introduction

Cordice for developers

Bots and Mini Apps for Cordice — with the libraries you already use for Telegram.

A Cordice bot is an account run by a program. It reads messages sent to it, answers with text and buttons, and can open a Mini App — a web page that runs inside the chat.

The Bot API speaks the same language as Telegram’s: the same methods, the same parameters, the same JSON. Existing bots written with aiogram, python-telegram-bot, grammY or telegraf run on Cordice by changing one thing — the server address. Mini Apps written for telegram-web-app.js work unchanged.

What is different from Telegram

  • IDs are strings. User, chat and message IDs are 64-bit and do not fit a JavaScript number, so they are sent as strings. Python libraries turn them into integers themselves; numbers are accepted on the way in.
  • Some buttons are not there yet — inline mode, payments, login URLs and buttons that request a contact, a location or a poll. They are dropped from a keyboard rather than breaking the message.
  • Bots see every message in a group they are in, as with Telegram’s privacy mode turned off.

The API is young and grows release by release. What changes is written down in the updates.