Actions And Identityprofile.get

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.

PropertyValue
Scopeprofile.basic
Who can use itVerified developers only
StatusAvailable

Parameters

None. Send no params, or an empty object.

Result

FieldTypeDescription
namestring or nullThe display name.
usernamestring or nullThe Aksa username.
photostring or nullA profile photo URL.

Errors

CodeWhen
4001The person said no, now or earlier.
4200The phone cannot offer it, the scope is gated, or the app has no live listing.
4290More than 30 requests in 10 seconds.

See Error Codes for every code and how they reach your page.

Example

js
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.basic also lets context.get return your per-app userId.
  • 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.