ONLYOFFICE API v.7.2
Tags: api, news, update, onlyoffice
Published: 2022-10-06 14:58:56

Along with the release of the new features in version 7.2, we updated API for the editors and plugins.

## Live viewer and new license parameters

Live viewer allows users to see the changes made by other collaborators in real time when opening a document, spreadsheet, or presentation in the view only mode. [Learn more](https://api.onlyoffice.com/editors/viewing)

To implement this feature, you need to get a new license which will include separate fields for live viewer: `connections_view` and `users_view_count` for the number of connections and users, and `users_view` for user quota. 

## Working with documents from the outside

A new API class allows interacting with text documents, spreadsheets, presentations, and fillable forms from the outside. This way, you can create a special connector to make changes to the documents using your own buttons/methods instead of the editor buttons. For example, you will be able to generate a feed with comments from all your documents, reply to them and close comments in one place, or automatically fill out forms with the data exported from databases.

Please note: the Connector API class is included in the Advanced API and at the moment is available as a demo only (it will be added to the API documentation with the next update – version 7.2.1). If you would like to try it now, please contact our sales team at sales@onlyoffice.com.

## API enhancements for plugins

**Plugin marketplace**. The new plugin manager allows users to explore all available plugins and install or remove any plugin with just one click right in the editors. In this regard, we updated instructions in the [API documentation](https://api.onlyoffice.com/plugin/) on creating and adding plugins. 

**Updated localization scheme**. Now you can add a langs.json file in the folder with translations. [Learn more](https://api.onlyoffice.com/plugin/localization)

**New methods**: `ChangeOleObject`, `GetAllForms`, `GetFileToDownload`, `GetFormsByTag`, `GetFormValue`, `GetImageDataFromSelection`, `GetInstalledPlugins`, `InstallPlugin`, `PutImageDataToSelection`, `RemovePlugin`, `SetFormValue`, `ShowButton`, `UpdatePlugin`, etc.

Check the full [API changelog for plugins](https://api.onlyoffice.com/plugin/changelog#72)

## JWT enabled by default

Starting from version 7.2, a random JWT secret is automatically generated and just needs to be added on the side of the host application. You can obtain the default JWT secret and replace it with a custom key if required. [Learn more](https://www.onlyoffice.com/blog/2022/09/what-is-jwt/)

## Other API updates

**Dark Contrast theme**. Enable a new Dark theme variation in the `editorConfig.customization.uiTheme` parameter. It has even darker shades, while the working surface is almost black.

```
"customization": { ......
   "uiTheme": "theme-contrast-dark",
    }, .......
```

**Adjusting About section**. You can now add your company phone number in the About section in the editors, along with your logo, address, email, etc. To do it, configure the `editorConfig.customization.customer` parameter.

```
"editorConfig": {         
    "customization": { ........
         "customer": {
         "address": "My City, 123a-45",
           .....
         "phone": "37188888888"
           },
```

**Four-letter language codes**. The `editorConfig.lang` parameter which defines the editor interface language supports four-letter codes. For example, to set Portuguese language, specify `pt-pt`, while `pt-br` indicates Brazilian Portuguese. The same refers to the language codes `zh-cn` (Simplified Chinese) and `zh-tw` (Traditional Chinese).

```
"editorConfig": {
.....
 "lang": "pt-pt",
```

**New action for WOPI discovery**. The `embedview` action in WOPI discovery renders a non-editable view of a document that is optimized for embedding in a web page.

```	
<action name="embedview" ext="docx"...
```
## Updated pricing calculator

The new package calculator allows configuring more parameters like multitenancy and multi-server, access to advanced API, live viewer, etc. [Learn more](https://www.onlyoffice.com/blog/2022/09/docs-developer-edition-7-2/)

## Useful links

[API changelog](https://api.onlyoffice.com/editors/changelog)

[Updated API for Document Builder](https://dev.to/onlyoffice/onlyoffice-document-builder-72-2f40)

[Updates in ONLYOFFICE Docs 7.2](https://dev.to/onlyoffice/onlyoffice-docs-developer-edition-version-72-released-1hmo)

[Get ONLYOFFICE Docs 7.2 Developer Edition](https://www.onlyoffice.com/download-docs.aspx#docs-developer)