Users

Update a user

PUT
https://peertube2.cpy.re/api/v1/users/{id}

Body

application/json
emailemail

The updated email of the user

Show child attributes

The user email

email<email>
emailVerifiedboolean

Set the email as verified

videoQuotainteger

The updated video quota of the user in bytes

videoQuotaDailyinteger

The updated daily video quota of the user in bytes

pluginAuthstring | null

The auth plugin to use to authenticate the user

Example
peertube-plugin-auth-saml2
roleUserRole012

The user role (Admin = 0, Moderator = 1, User = 2)

Example
2
adminFlagsUserAdminFlags01

Admin flags for the user (None = 0, Bypass video blocklist = 1)

Example
1
currentPasswordcurrentPassword

Required to give the administrator role, or to change the password, email or auth plugin of an administrator, see password confirmation

Show child attributes

Password of the authenticated user, required if password confirmation is enabled

currentPassword<password>

Parameters

idid>= 1requiredpath

Entity id

Response

204No Content

successful operation

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.