profile.get
Reads the person's name, username and photo, with consent.
Returns exactly the three fields the consent sheet names, whatever else the account holds.
| Property | Value |
|---|---|
| Scope | profile.basic |
| Who can use it | Verified developers only |
| Status | Available |
Parameters
None. Send no params, or an empty object.
Result
| Field | Type | Description |
|---|---|---|
name | string or null | The display name. |
username | string or null | The Aksa username. |
photo | string or null | A profile photo URL. |
Errors
| Code | When |
|---|---|
4001 | The person said no, now or earlier. |
4200 | The phone cannot offer it, the scope is gated, or the app has no live listing. |
4290 | More than 30 requests in 10 seconds. |
See Error Codes for every code and how they reach your page.
Example
const p = await window.aksa.request({ method: "profile.get" });
greeting.textContent = p.name ? "Hello, " + p.name : "Hello";Notes
- The first call opens the consent sheet. A denial is remembered and reported as
4001. - Granting
profile.basicalso letscontext.getreturn your per-appuserId. - Needs a verified developer. A basic developer cannot declare this scope.
Used By
Ready To Build Or Ship?
Check your files, preview on an iPhone frame, and submit in the Developer Studio.