Users

A user in GitBook is the entity of someone who has signed up with an account.

Get profile of authenticated user

get

Returns details about the user associated with the authentication provided in the request's authorization header.

Authorizations
Responses
200

OK

application/json
get
/user
GET /v1/user HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "user",
  "id": "text",
  "displayName": "text",
  "email": "text",
  "photoURL": "text",
  "urls": {
    "location": "https://example.com"
  }
}

Get a user by its ID

get

Provides publicly available information about someone with a GitBook account.

Authorizations
Path parameters
userIdstringRequired

The unique ID of the User

Responses
200

OK

application/json
get
/users/{userId}
GET /v1/users/{userId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "object": "user",
  "id": "text",
  "displayName": "text",
  "email": "text",
  "photoURL": "text",
  "urls": {
    "location": "https://example.com"
  }
}

Last updated

Was this helpful?