Files
thijooree/docs/mibapi/07-profile.md
Shihaam Abdul Rahman 256f216da4
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 4s
update docs
2026-05-23 23:46:00 +05:00

1.9 KiB

Personal Profile

Fetch the user's personal profile details. This endpoint returns an HTML page; data is extracted via HTML scraping.


Endpoint

GET https://faisamobilex-wv.mib.com.mv/personalProfile

Authentication

Session cookies only — no additional AJAX headers required.

Cookie: mbmodel=IOS-1.0; xxid=<session_xxid>; IBSID=<session_xxid>; mbnonce=<nonceGenerator>; time-tracker=597

Response

Content-Type: text/html; charset=UTF-8

The page contains an <h5> with the user's full name and <span> elements with labelled fields.

Parsing Strategy

Full name — extracted from:

<h5 class="mb-1 text-dark fw-semibold">Mohamed Ali</h5>

Regex:

Regex("""<h5 class="mb-1 text-dark fw-semibold">\s*([^<]+)\s*</h5>""")

Labelled fields — each follows this pattern:

<span ...><b ...>Username:</b ...>...<span ...>myusername</span>

Regex (used for each label):

Regex(
    """<span[^>]*>\s*<b[^>]*>\s*$label\s*</b[^>]*>.*?<span[^>]*>([^<]+)</span>""",
    setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE)
)

Extracted Fields

Label in HTML Field Description
Username: username Login username
Email: email Registered email address
Mobile no: mobile Registered mobile number
Enrolled: enrolled Enrollment date or status

Combined with the fullName from the <h5>:

data class MibPersonalProfile(
    val fullName: String,
    val username: String,
    val email: String,
    val mobile: String,
    val enrolled: String
)

Notes

  • Returns null if the response cannot be parsed (network error or unexpected HTML structure).
  • This endpoint does not have a JSON equivalent — scraping is the only method.

 


← Financing     Next → Transfer