GET
/
user
JavaScript
import Weights from '@weights-ai/sdk';

const client = new Weights({
  bearerToken: 'My Bearer Token',
});

const user = await client.user.retrieve();

console.log(user.user);
{
  "user": {
    "id": "<string>",
    "email": "<string>",
    "image": "<string>",
    "role": "<string>",
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200
application/json

Returns the profile information of the currently authenticated user.

The response is of type object.