Skip to main content

Africa’s Talking AI Integration Course

Master the integration of Africa’s Talking telecommunication APIs with Google Gemini AI to build intelligent SMS, Voice, Airtime, USSD, and SIM Swap applications.

Quick start

Get up and running with Africa’s Talking APIs and Google Gemini AI in minutes

1

Clone the repository and set up your environment

Clone the course repository and create a virtual environment for Python dependencies.
git clone https://github.com/DaggieBlanqx/Google-Africastalking-AI-Course
cd Google-Africastalking-AI-Course
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
2

Install dependencies

Install all required Python packages using the Makefile command.
make install
This installs Flask, the Africa’s Talking SDK, Google AI libraries, and other dependencies.
3

Configure your credentials

Create a .env file in the project root with your Africa’s Talking and Google Cloud credentials.
AT_USERNAME=your_at_username
AT_API_KEY=your_at_api_key
AT_VOICE_NUMBER=your_voice_enabled_phone_number
AT_SHORTCODE=8995
PROJECT_ID=your_gcp_project_id
GEMINI_API_KEY=your_gemini_api_key
Get your Africa’s Talking credentials at account.africastalking.com and your Gemini API key at aistudio.google.com.
4

Set up tunneling and start the server

Expose your local server to the internet using ngrok or another tunneling tool, then start the Flask application.
# In one terminal, start ngrok
ngrok http 5000

# In another terminal, start the Flask app
make dev
Your server is now running and accessible via the ngrok URL. Configure this URL in your Africa’s Talking app settings for webhook callbacks.

Explore by topic

Dive into specific Africa’s Talking services and learn how to enhance them with AI

SMS integration

Send bulk SMS, handle two-way messaging, and receive delivery reports

Voice calls

Make outbound calls and handle inbound calls with AI-powered responses

Airtime distribution

Distribute airtime to phone numbers and handle transaction callbacks

USSD menus

Build interactive USSD applications with session management

SIM swap detection

Detect SIM swap events for fraud prevention and security

AI integration

Integrate Google Gemini AI for intelligent, context-aware responses

Core concepts

Understand the architecture and key concepts behind the integration

Architecture

Learn about the Flask application structure and route organization

Webhooks

Handle asynchronous callbacks from Africa’s Talking services

AI integration

Discover how Gemini AI enhances telecommunication services

Ready to build intelligent telecom applications?

Start with our quickstart guide and build your first AI-powered SMS or voice application in under 10 minutes.

Start building

Build docs developers (and LLMs) love