🎯 Purpose for OutSystems Tutorial
This API is essential for teaching **Basic Authentication** consumption. It shows how to:
- Set the **Authentication Type** to Basic in the OutSystems REST method definition.
- Supply the **Username** and **Password** directly in the setup, which OutSystems then base64-encodes and sends in the Authorization header.
- Handle the **401 Unauthorized** challenge response.
🔗 API Endpoint Details
Method:
GET
Endpoint URL:
https://api.ankitg.in/api/auth-products.php
🔑 Required Credentials
| Parameter | Value |
|---|---|
| Username | ankitg |
| Password | lowcode123 |
💬 Expected Responses
A. Success Response (200 OK) - Correct Credentials
Returns the product list when the correct credentials are provided via Basic Auth.
[
{
"id": 101,
"name": "OutSystems Pro Course",
"price": 499.99,
"inStock": true
},
// ... remaining products
]
B. Failure Response (401 Unauthorized) - Incorrect Credentials
Returns a generic error if the username or password is incorrect or missing.
{
"error": "Unauthorized",
"message": "Invalid credentials provided."
}