Lecture Introduction for API
Lecture Introduction for API
Web Development
ICT Lecture
Application Programming
Interface (API)
• Why are APIs important in Web
Development?
• APIs enable communication between different
services.
• They allow developers to integrate external
systems and data into their apps without
building everything from scratch.
• Examples of apps using APIs: Foodpanda,
InDrive, Bykea.
• APIs facilitate everything from payment
gateways to location tracking.
How Foodpanda Tracks Your
Delivery
• Example of Foodpanda:
• Foodpanda uses Google Maps API to track the delivery.
• Google Maps provides location data, but Foodpanda cannot
access it directly for security reasons.
• Foodpanda requests the data through an API to track the
delivery person in real-time.
What Is an API?
• API as a messenger:
• An API acts as a middleman that sends data
from one system to another.
• Example: Foodpanda requests information from
Google Maps via API to track the delivery.
• How it works:
• Foodpanda asks for data from the API (like
delivery location).
• The API checks with Google Maps if the data
can be shared.
• If yes, the data is shared; if no, the request is
denied.
Data Requests and Security
• Security in API:
• Direct access to databases or systems is not allowed for third-party apps.
• Instead, APIs ensure secure data access by filtering and validating requests.
• Example: Apps asking Google or Facebook to verify users for registration.
• API Key:
• Each developer is given a security key (API Key) to access an API securely.
• APIs monitor and ensure no illegal activities or abuse.
API Key