An open API service indexing awesome lists of open source software.

https://github.com/endocrimes/endobot


https://github.com/endocrimes/endobot

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# endobot

endobot is a personal telegram bot for doing random stuff. Mostly for notifying
me when things happen.

## Running

```bash
export JWT_SECRET="my-secret-key"
export TELEGRAM_BOT_TOKEN="your-telegram-api-key"
export LISTEN_ADDR=":8080"
./endobot
```

## The Bot

### Commands

#### `/token`

This command generates a new JWT that can be used to authenticate with the bots
API.

## API

(Sorry these docs are bad. I should use some tooling around this, but this is
just notes for myself rn)

### Authentication

All APIs require authentication. Authentication tokens can be generated by
messaging the Telegram bot with a `/token` command.

The API will parse tokens from two places, firstly the `Authorization` header.
If the `Authorization` header is empty or not present, then it will fall back to
a `token` URL Param.

### POST /notify

#### Body

```json
{
"message": "the message contents",
"disable_notification": false
}
```