Send SMS code

POST /api/2.0/authentication/sendsms

Request

Sends SMS with an authentication code.

Headers

Acceptenum of string

Can be one of: application/json, text/json, text/plain.

Content-Typeenum of string

Can be one of: application/json, application/*+json, text/json.

Body

Authentication request parameters

userNamestring

Username / email

passwordstring

Password

passwordHashstring

Password hash

providerstring

Provider type

accessTokenstring

Provider access token

serializedProfilestring

Serialized user profile

codestring

Two-factor authentication code

codeOAuthstring

Code for getting a token

sessionboolean

Session based authentication or not

confirmDataobject
emailstringformat: email

Email address

firstboolean

Access an account for the first time or not

keystring

Key

recaptchaTypeone of
.enum of string

[Default - Default, AndroidV2 - AndroidV2, iOSV2 - iOSV2, hCaptcha - hCaptcha]

Can be one of: Default, AndroidV2, iOSV2, hCaptcha.

.enum of integer

[0 - Default, 1 - AndroidV2, 2 - iOSV2, 3 - hCaptcha]

Can be one of: 0, 1, 2, 3.

recaptchaResponsestring

reCAPTCHA response

culturestring

Culture

Examples

POST /api/2.0/authentication/sendsms HTTP/1.1
Accept: application/json
Content-Length: 427
Content-Type: application/json
Host: example.com

{
  "userName": "some text",
  "password": "Hl45MhOpmu",
  "passwordHash": "some text",
  "provider": "some text",
  "accessToken": "some text",
  "serializedProfile": "some text",
  "code": "some text",
  "codeOAuth": "some text",
  "session": true,
  "confirmData": {
    "email": "Katarina.Cartwright44@yahoo.com",
    "first": true,
    "key": "some text"
  },
  "recaptchaResponse": "some text",
  "culture": "some text"
}
curl --request POST \
  --url https://example.com/api/2.0/authentication/sendsms \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "userName": "some text",
  "password": "Hl45MhOpmu",
  "passwordHash": "some text",
  "provider": "some text",
  "accessToken": "some text",
  "serializedProfile": "some text",
  "code": "some text",
  "codeOAuth": "some text",
  "session": true,
  "confirmData": {
    "email": "Katarina.Cartwright44@yahoo.com",
    "first": true,
    "key": "some text"
  },
  "recaptchaResponse": "some text",
  "culture": "some text"
}'

Responses

200

Authentication data

tokenstring

Authentication token

expiresstringformat: date-time

Token expiration time

smsboolean

Specifies if the authentication code is sent by SMS or not

phoneNoisestring

Phone number

tfaboolean

Specifies if the two-factor application is used or not

tfaKeystring

Two-factor authentication key

confirmUrlstringformat: uri

Confirmation email URL

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, 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).