SkillAgentSearch skills...

TelegramApiVue

SDK Telegram Api for VueJs

Install / Use

/learn @Penguin3007/TelegramApiVue
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Telegram Api for Vuejs

Based on TelegramApiJs

Getting started

  1. Install package via npm
npm install telegram-api-vue
  1. Import in your main.js
import telegramApi from './plugins/telegram';
  1. Create file telegram.js in plugins folder

  2. Put config in created file telegram.js

/* You should register your application on https://my.telegram.org/ */

import * as telegramApi from 'telegram-api-vue/dist/telegramApi.min';

telegramApi.setConfig({
  app: {
    id: 1167695, /* App ID */
    hash: 'b5fbdce2ae649419c889c1eb970407bc', /* App hash */
    version: '1.0.0' /* App version */
  },
  server: {
    test: [
      {
        id: 2, /* DC ID */
        host: '149.154.167.40',
        port: 443
      }
    ],
    production: [
      {
        id: 2, /* DC ID */
        host: '149.154.167.50',
        port: 443
      }
    ]
  }
});

export default telegramApi;
  1. Check your status
telegramApi.getUserInfo().then(function(user) {
    if (user.id) {
        // You have already signed in
    } else {
        // Log in
    }
});

API documentation

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated2y ago
Forks2

Languages

JavaScript

Security Score

75/100

Audited on Dec 27, 2023

No findings