Skip to content

DanNduati/at-ussd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AT-USSD

AT-USSD background

Setup

1. AT Developers account

  1. Create your AT developer account
  2. Login to AT developer account
  3. Go to Sandbox App

2. Running apps locally

Clone the repo and navigate into it

git clone git@github.com:DanNduati/AT-USSD.git
cd at-ussd/

Install dependecies

pip install -r requirements.txt

Run the application

I've implemented the application logic with 2 web frameworks Flask and FastAPI you can select either.

  1. Flask
Navigate to app directory
cd flask_app/
Start server
python app .py
  1. FastAPI
Navigate to app directory
cd fastapi_app/
Start server
uvicorn main:app --reload

3. Port forwading with ngrok

ngrok http <port number>

4. Create a USSD service code

  1. Create a new USSD channel The following information is needed to create the channel:
    • Service code this is shared by default : *384#
    • Channel this is a unique number appended to the service code to differentiate your app from other apps eg: 069
    • Callback URL this is a public address that is invoked by the AT API when a subscriber dails the ussd code use the exposed ngrok public url In my case the service code is: *384*069#

Outcome

Todo

  • Improve menu logic and navigation
  • Add mpesa STK-Push
  • Improve exception handling

About

Consuming AT-USSD with python Flask and FastAPI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages