import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const user = await client.users.update('user_xxxxxxxxxxxxx');
console.log(user.id);{
"id": "user_xxxxxxxxxxxxx",
"username": "johndoe42",
"name": "John Doe",
"created_at": "2023-12-01T05:00:00.401Z",
"bio": "building cool things on the internet",
"profile_picture": {
"url": "https://media.whop.com/abc123/optimized.jpg"
}
}Update a user’s profile by their ID.
Required permissions:
user:profile:updateimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const user = await client.users.update('user_xxxxxxxxxxxxx');
console.log(user.id);{
"id": "user_xxxxxxxxxxxxx",
"username": "johndoe42",
"name": "John Doe",
"created_at": "2023-12-01T05:00:00.401Z",
"bio": "building cool things on the internet",
"profile_picture": {
"url": "https://media.whop.com/abc123/optimized.jpg"
}
}Documentation Index
Fetch the complete documentation index at: https://docs.whop.com/llms.txt
Use this file to discover all available pages before exploring further.
A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The unique identifier of the user to update. Accepts 'me', a user tag, or a username.
"user_xxxxxxxxxxxxx"
Parameters for UpdateUserProfile
A short biography displayed on the user's public profile.
When provided, updates the user's profile overrides for this company instead of the global profile. Pass name and profile_picture to set overrides, or null to clear them.
"biz_xxxxxxxxxxxxxx"
The user's display name shown on their public profile. Maximum 100 characters.
The user's profile picture image attachment.
Show child attributes
The user's unique username. Alphanumeric characters and hyphens only. Maximum 42 characters.
A successful response
A user account on Whop. Contains profile information, identity details, and social connections.
The unique identifier for the user.
"user_xxxxxxxxxxxxx"
The user's unique username shown on their public profile.
"johndoe42"
The user's display name shown on their public profile.
"John Doe"
The datetime the user was created.
"2023-12-01T05:00:00.401Z"
A short biography written by the user, displayed on their public profile.
"building cool things on the internet"
The user's profile picture attachment with URL, content type, and file metadata. Null if using a legacy profile picture.
Show child attributes
Was this page helpful?