Skip to content

Slack bot monitoring a prepaid card status: funds and internet bandwidth left

Notifications You must be signed in to change notification settings

ertrzyiks/prepaid-card-slack-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prepaid card slack bot

Monitor the funds and other resources related to my prepaid SIM card account managed by Plus operator.

Installation

  1. Install yarn dependencies
yarn install
  1. Install puppeteer OS dependencies. They are listed in apt-packages in this repo as well.

  2. Set all the env variables from lib/config.js file and start the server

yarn start

How it works

It's a regular scrapper, but to log in to the admin area we need not only a login/password but also a one-time password sent by SMS. The flow is following:

  1. Bot sends a request via Slack on a scheduled basis
  2. Once the request is approved, starts the headless Chrome and try to log in
  3. Meanwhile opens a Slack dialog waiting for a session password
  4. User receives the session password over SMS and types in the Slack dialog
  5. Headless Chrome uses the password and proceeds with the account checks.

Dependencies

About

Slack bot monitoring a prepaid card status: funds and internet bandwidth left

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published