Users

Create a user

POST
https://peertube2.cpy.re/api/v1/users

Body

application/json

If the smtp server is configured, you can leave the password empty and an email will be sent asking the user to set it first.

usernameusernamerequired

immutable name of the user, used to find or mention its actor

Example
chocobozzz
passwordpassword<password>required
emailstring<email>required

The user email

videoQuotainteger

The user video quota in bytes

Example
-1
videoQuotaDailyinteger

The user daily video quota in bytes

Example
-1
channelNameusernameChannel

immutable name of the channel, used to interact with its actor

Example
framasoft_videos
roleUserRole012required

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 create an administrator, see password confirmation

Show child attributes

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

currentPassword<password>

Response

user created

Response fields application/json
userobject
Show child attributes
idid>= 1
Example
42
accountobject
Show child attributes
idid>= 1
Example
42
403Forbidden

insufficient authority to create an admin or moderator

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.

Scopes: admin