← Back to Sample APIs

Admin Profile API

Returns the admin user profile. Requires HTTP Basic Authentication — used to practise setting up Basic Auth in OutSystems Consume REST API.

01

Endpoint

GET https://labs.lowcademy.com/apis/me
PropertyValue
MethodGET
Base URLhttps://labs.lowcademy.com/apis/
Fileme.php
AuthenticationHTTP Basic Auth (username + password)
Request BodyNot required
02

Authentication — Basic Auth

This API uses HTTP Basic Authentication. The browser/client encodes username:password in Base64 and sends it in the Authorization header automatically when you use the Basic Auth option.

⚠ Lab Credentials — For Training Use Only

Usernameadmin
Password1234
EncodedYWRtaW46MTIzNA==
03

Sample Requests

cURL (Basic Auth shorthand)

curl -u admin:1234 https://labs.lowcademy.com/apis/me

cURL (manual Authorization header)

curl -H "Authorization: Basic YWRtaW46MTIzNA==" \
     https://labs.lowcademy.com/apis/me

JavaScript (fetch)

const credentials = btoa('admin:1234'); // Base64 encode
const res = await fetch('https://labs.lowcademy.com/apis/me', {
  headers: { 'Authorization': 'Basic ' + credentials }
});
const data = await res.json();

OutSystems — Consume REST API (Basic Auth)

// When adding the REST API in OutSystems:
// Authentication → Basic Authentication
// Username: admin
// Password: 1234
// OutSystems handles the encoding automatically.
04

Response — 200 OK

FieldTypeDescription
successBooleanAlways true on success
profile.idIntegerUser ID
profile.usernameStringLogin username
profile.nameStringDisplay name
profile.emailStringEmail address
profile.roleStringUser role
profile.planStringSubscription plan
profile.createdStringAccount creation date
{
  "success" : true,
  "profile" : {
    "id"      : 1,
    "username": "admin",
    "name"    : "Admin User",
    "email"   : "admin@labs.lowcademy.com",
    "role"    : "Administrator",
    "plan"    : "Pro",
    "created" : "2024-01-01"
  }
}
05

Error Responses

200
OK — Profile returned.
401
Unauthorized — Missing or wrong credentials.
{"success":false,"error":"Unauthorized. Provide valid Basic Auth credentials."}
405
Method Not Allowed — Use GET.