Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Retrieve

client.me.profile.retrieve(RequestOptionsoptions?): ProfileRetrieveResponse { id, bio, email, 6 more }
get/v1/me

Get profile information for the current user

ReturnsExpand Collapse
ProfileRetrieveResponse { id, bio, email, 6 more }

Your user information, with tier and email included

id: string

The ID of this user

formatuuid
bio: string | null

The user’s biography, if they have provided one

email: string | null

Your email address

URL of this user on this API

formaturi
profileImageUrl: string | null

URL that points to the user’s profile image, if one exists

formaturi
tier: "free" | "pro" | null

Your account tier

Accepts one of the following:
"free"
"pro"
type: "user" | "org"

Whether this is a user or an organization

Accepts one of the following:
"user"
"org"
url: string

URL of this user’s profile on Val Town’s website

formaturi
username: string | null

The user’s handle that they chose for themselves. Does not include the @ symbol

import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

const profile = await client.me.profile.retrieve();

console.log(profile.id);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "bio": "bio",
  "email": "email",
  "links": {
    "self": "https://example.com"
  },
  "profileImageUrl": "https://example.com",
  "tier": "free",
  "type": "user",
  "url": "https://example.com",
  "username": "username"
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "bio": "bio",
  "email": "email",
  "links": {
    "self": "https://example.com"
  },
  "profileImageUrl": "https://example.com",
  "tier": "free",
  "type": "user",
  "url": "https://example.com",
  "username": "username"
}