# How does my app read the signed-in person's name, e-mail and picture?

Checked 2026-11-15 against GilbApp d5296208bbffa2ab70076e6194f5537c4be1ddf7.

Find the person's vault with GET /lws/vaults, call POST …/selfcard \(it may make their card\), then read name, email and profilePhoto from the card.

## Before you start

Your app [holds a person's sign-in token and its key](http://support.gilb.com/help/how-do-i-use-the-sign-in-kit), and the person may write to the vault, because the selfcard call writes when it has to make the card.

## Steps

1. Find the person's own vault.

   Send GET https://id.gilb.com/lws/vaults with the token and a new proof, and take the vaultId of the entry where isLandingVault is true, the vault the person signs in to. Its host is the part between https:// and the next /, such as &lt;name\>.gilb.com.

   Every call here carries the header Authorization: DPoP followed by the token, and [a new DPoP proof](http://support.gilb.com/help/how-do-i-make-a-dpop-proof-for-each-request). A DPoP proof is a short signed note your app makes for one request, naming its method and address \(RFC 9449\). Use vaultId as given: it can end in /vault or in /base. With no token the list answers 200 with no vaults, not 401. If no entry has isLandingVault true, this token does not reach the person's own vault, and you cannot read their card this way.
2. Ask for the person's own card; this call makes it if there is none.

   Send POST https://&lt;name\>.gilb.com/lws/vault/&lt;the vaultId, encoded\>/selfcard with the body {"type":"t:Person","facts":{"a:email":"&lt;the e-mail the person signed in with\>"}}. This call can write: when the person has no card yet, it makes one from the facts you send and answers 201; when the card already exists, it returns it unchanged, writes nothing and answers 200. Either way the card's address is in location, with an ETag.

   Encoded means written with encodeURIComponent, so the address fits in one part of the path. A second call does not make another card. Send it to the vault's own host, not to https://id.gilb.com. 409 SelfCardIdentityUnknown means GilbPlatform could not tell which card is the owner's, and wrote nothing.
3. Read the card.

   Send GET to the address in location, with a new proof made for it; the answer is 200 with the card. Read name, givenName, familyName, email and profilePhoto.

   Fact names come back without a:, so a:name reads name. Any of them may be missing: a card holds only what sign-up wrote and what the person set later. profilePhoto is text, /files/ and the picture's id, not a link. 404 means the card is not there, you may not read it, or you asked on another host; the platform does not say which.
4. Fetch the picture.

   Fetch the picture with the person's token:
   GET https://&lt;name\>.gilb.com/files/&lt;the id in profilePhoto\>

   A file you may not read answers 404. An img tag cannot send a token, so fetch the bytes and show them from memory. The picture is usually the face, a small JPEG at most 256 pixels on its longest side; the answer [How does a profile picture \(face\) work?](http://support.gilb.com/help/how-does-a-profile-picture-face-work) says more.

## Deeper

Also asked:

How do I read the signed-in person's name, e-mail and picture? From the person's own card, a t:Person record GilbPlatform makes in their first vault when they sign up: read name, email and profilePhoto from it, as the steps show.

What the card holds. At sign-up GilbPlatform writes email, the address the person signed up with. When the part before the @ is one word of letters, it also writes name and givenName guessed from it; when it is two such words joined by a dot, a dash or an underscore, it also writes familyName, such as Sample Demo from sample.demo@; otherwise it writes no name. The person can set their names and picture later; the answer [How do I set my name and picture?](http://support.gilb.com/help/how-do-i-set-my-name-and-picture) shows how. So read givenName and familyName as well as name, and read the card again when you need it rather than keeping a copy.

Is there a route that returns who is signed in? GilbPlatform has no /base/me or whoami route for a person. verify-code answers token and principal, the person's WebID, the web address that names a person on GilbPlatform; the e-mail is the one your app sent to request-code.

If verify-code answered needsVaultName true, the person has no vault yet, and so no card: [the answer on using the sign-in kit](http://support.gilb.com/help/how-do-i-use-the-sign-in-kit) shows how the first vault is made.

Another person's picture is not read this way: ask GET https://id.gilb.com/base/connect/profile-photo?principal=&lt;their WebID\>. It gives the picture only when that person has placed their photo at a sharing level that admits the caller, and 404 to anyone else. The answer [How does a profile picture \(face\) work?](http://support.gilb.com/help/how-does-a-profile-picture-face-work) shows how a picture is set.

Source: GilbPlatform 0fc5a548 \(https://id.gilb.com/version, read 14 November 2026\): src/lws/signup-self-card.ts:39-114 \(the sign-up card: t:Person with a:email; a:name, a:label, a:givenName, a:familyName guessed from the part before the @ only for one word or two words split by . \_ or -; a:directReader\), :126-160 \(made in the new personal vault; idempotent\); src/auth/signup-card-hook.ts:9-11 \(a card that did not land is made by /selfcard\); src/lws/routes.ts:349-375 \(location and ETag\), :878-920 \(POST /lws/vault/:vaultId/selfcard, write authority, 409 SelfCardIdentityUnknown\); src/lws/self-card.ts:1-140 \(an existing card is returned untouched, 200; otherwise created from the body, 201\); src/lws/vaults.ts:170-177 \(isLandingVault\); src/routes/connect-profile-fields.ts:312-410 \(GET /base/connect/profile-photo\). No /base/me or whoami route for a person \(/base/delegation/whoami is for delegation\). Developer Guide chapter Dev.Guide.SignIn, exhibit Dev.Guide.SignIn.Code \(verify-code answers token and principal\). Live answers, sentences shared: How do I write a record and read it back?; How do I create a vault, list vaults and export one by API?; How does a profile picture \(face\) work?; How do I use the sign-in kit?; How do I sign in from my app and return the person to it?
