/Airtel_Scriptable_Widget

iOS widget for Airtel Data Usage.

Primary LanguageJavaScript

airtel-widget

Airtel Widget for iOS

iOS widget that shows airtel daily data usage using Scriptable app.

Setup:

NOTE: Setting up widget (getting Airtel API auth data) is HARD, but its one time process.

Setup widget:

  • Add widget to Scriptable app.
  • On line 1, const dailyDataLimit = 3072 change it with your daily limit in MB (1 GB = 1024 MB)
  • On widget parameter, add you mobile number (as in screenshot below)

Get Airtel API authentication data:

  • Proxy Airtel Thanks and get authentication for Airtel API (Endpoint: https://myairtelapp.bsbportal.com/app/guardian/api/services/v1/prepaid?&siNumber=yourNumber) (You can check how to proxy iOS app on youtube)
  • From that endpoint get header value for (user-agent, X-Bsy-Utkn, X-Bsy-Did, X-Bsy-Dt)
  • Create AirtelAuth.json file in Scriptable folder in files app and save data in following format:
{
    "us": "Value for user-agent",
    "tk": "Value for X-Bsy-Utkn",
    "id": "Value for X-Bsy-Did",
    "dt": "Value for X-Bsy-Dt"
}

Thats it.

widget design credit: sillium