Authenticate a user by code

POST /api/2.0/authentication/{code}

Request

Authenticates the current user by SMS or two-factor authentication code.

Headers

Acceptenum of string

Can be one of: application/json.

Content-Typeenum of string

Can be one of: application/json.

Path

codestring

Two-factor authentication code

Body

userNamestring

User name or email

passwordstring

Password

providerstring

Social media provider type

accessTokenstring

Provider token

codeOAuthstring

Code for getting a token

Examples

POST /api/2.0/authentication/%7Bcode%7D HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: example.com
curl --request POST \
  --url https://example.com/api/2.0/authentication/%7Bcode%7D \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json'

Responses

200

Two-factor authentication token to use in the 'Authorization' header when calling API methods

Tokenstring
Expiresstring
Smsboolean
PhoneNoisestring
Tfaboolean
TfaKeystring

Get Help

  • If you have any questions about ONLYOFFICE Workspace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).