Get Started
Portal api methods
Help

POST api/2.0/authentication/{code}

Description

Gets two-factor authentication token for use in api authorization

Parameters
Name Description Type Example
code
sent in url
sms code string some text
userName
sent in body
user name or email string some text
password
sent in body
password string some text
provider
sent in body
social media provider type string some text
accessToken
sent in body
provider token string some text
Example
POST api/2.0/authentication/some+text
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "userName": "some text",
  "password": "some text",
  "provider": "some text",
  "accessToken": "some text"
}
Returns

tokent to use in 'Authorization' header when calling API methods

Example Response

application/json

{
  "status": 0,
  "response": {
    "token": "sdjhfskjdhkqy739459234",
    "expires": "2019-06-17T17:27:53.8791371Z",
    "sms": false,
    "phoneNoise": ""
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <token>sdjhfskjdhkqy739459234</token>
    <expires>2019-06-17T17:27:53.8791371Z</expires>
    <sms>false</sms>
    <phoneNoise></phoneNoise>
  </response>
</result>