JSPM

tribute-tg

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q25848F
  • License MIT

Unofficial API client for Tribute Telegram Bot

Package Exports

  • tribute-tg

Readme

tribute-tg

Unofficial API client of Tribute - a service for monetization in Telegram.

Wiki

Installation

npm i tribute-tg

Usage

Authorization token can be obtained from a network request in the web version of Telegram while using the Tribute mini-app. See Authorization header (in the request with tribute.tg host) and copy value after TgAuth prefix.

import { Tribute } from 'tribute-tg';

const TOKEN = 'TG_AUTH_TOKEN'; // Use your token here

const tribute = new Tribute(TOKEN);

async function main() {
  const dashboard = await tribute.getDashboard();
  // ...
}