Skip to content

Instantly share code, notes, and snippets.

@harmankang
harmankang / telegram.swift
Created November 14, 2022 19:58
Telegram API -sendMessage and -sendDocument using URLSession (Swift)
// URLSession wrapper to send messages and text files to Telegram chat.
final class TelegramAPI {
/// -sendMessage endpoint
private let sendMessageEndpoint: String
/// -sendDocument endpoint
private let sendDocumentEndpoint: String
/// Unique identifier for the target chat or username of the target channel

Keybase proof

I hereby claim:

  • I am harmankang on github.
  • I am hsk (https://keybase.io/hsk) on keybase.
  • I have a public key whose fingerprint is AACC CED5 F1C8 8D70 1164 60BB 8B96 C2A4 1AD2 1CCD

To claim this, I am signing this object: