Skip to main content
PATCH
/
users
/
me
JavaScript
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.updateProfile();

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"
  }
}

Authorizations

Authorization
string
header
required

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 ***************************

Body

application/json

Parameters for UpdateUserProfile

bio
string | null

A short biography displayed on the user's public profile.

name
string | null

The user's display name shown on their public profile. Maximum 100 characters.

profile_picture
FileInputWithId · object

The user's profile picture image attachment.

username
string | null

The user's unique username. Alphanumeric characters and hyphens only. Maximum 42 characters.

Response

A successful response

A user account on Whop. Contains profile information, identity details, and social connections.

id
string
required

The unique identifier for the user.

Example:

"user_xxxxxxxxxxxxx"

username
string
required

The user's unique username shown on their public profile.

Example:

"johndoe42"

name
string | null
required

The user's display name shown on their public profile.

Example:

"John Doe"

created_at
string<date-time>
required

The datetime the user was created.

Example:

"2023-12-01T05:00:00.401Z"

bio
string | null
required

A short biography written by the user, displayed on their public profile.

Example:

"building cool things on the internet"

profile_picture
object
required

The user's profile picture attachment with URL, content type, and file metadata. Null if using a legacy profile picture.