Retrieve
client.users.retrieve(stringuserID, RequestOptionsoptions?): User { id, bio, links, 4 more }
/v1/users/{user_id}
Get basic information about a user
Parameters
userID: string
Returns
import ValTown from "npm:@valtown/sdk";
const client = new ValTown();
const user = await client.users.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(user.id);
{
"id": "00000000-0000-0000-0000-000000000000",
"bio": "Hello world",
"links": {
"self": "https://example.com"
},
"profileImageUrl": null,
"type": "user",
"url": "https://val.town/u/tmcw",
"username": "tmcw"
}Returns Examples
{
"id": "00000000-0000-0000-0000-000000000000",
"bio": "Hello world",
"links": {
"self": "https://example.com"
},
"profileImageUrl": null,
"type": "user",
"url": "https://val.town/u/tmcw",
"username": "tmcw"
}