Obtain account token

Generate an Account-Token with your username and password. This Account-Token is necessary for all the following account operations.

  • username can be the account e-mail address, the login ID or the contact e-mail address.
  • Without the device parameters, the server returns the user's single account-wide token (the same token is returned on every call).
  • If platform, device_id and device_name are sent (all three are required together), a separate device token is created and listed under the user's linked devices. Depending on the user's role, connecting desktop (windows, linux, mac), android or ios clients may be denied.

Two-factor authentication (2FA): If 2FA is activated for your account, send the current one-time password in the header X-SEAFILE-OTP (backup codes are not accepted by the API). If it is missing or invalid, the server responds with 400 and the response header X-Seafile-OTP: required. With X-SEAFILE-2FA-TRUST-DEVICE: 1 the server additionally returns a X-SEAFILE-S2FA response header; sending this value in later requests as X-SEAFILE-S2FA skips the OTP check for the remembered device.

Failed login attempts are counted. Depending on the server configuration, the account is frozen after too many failed attempts.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

E-mail address, login ID or contact e-mail address

password
required

password

string

Device platform, e.g. windows, linux, mac, android, ios. Only together with device_id and device_name.

string

Unique ID of the device. Only together with platform and device_name.

string

Display name of the device. Only together with platform and device_id.

string

Optional client version, stored with the device token

string

Optional platform/OS version, stored with the device token

Headers
string
^\d{6}$

Two-factor token (usually generated with a mobile app like the google authenticator), optional, only needed if 2FA is activated for your account.

string
enum

Set to 1 to remember this device after a successful 2FA login. The response then contains the header X-SEAFILE-S2FA.

Allowed:
string

Value of the X-SEAFILE-S2FA response header of a previous trusted-device login. Skips the OTP check while the remembered device is valid.

string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

429

Too many requests (rate limit for anonymous requests)

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json