Event After Application Update OnAppUpdate

Choose a tool for developing with an AI agent:

  • use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
  • use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation

Scope: basic

Who can subscribe: any user

The ONAPPUPDATE event is triggered after a new version of the application is installed in Bitrix24. This event transmits information about the current and previous versions of the application, as well as the updated application_token. For more details, refer to the article Security in Handlers.

What the Handler Receives

Data is transmitted as a POST request

{
            "event": "ONAPPUPDATE",
            "data": {
                "VERSION": "2.1.0",
                "PREVIOUS_VERSION": "2.0.3",
                "LANGUAGE_ID": "de"
            },
            "ts": "1696527000",
            "auth": {
                "domain": "some-domain.bitrix24.com",
                "scope": "imbot",
                "access_token": "lh8ze36o8ulgrljbyscr36c7ay5sinva",
                "refresh_token": "5f1ih5tsnsb11sc5heg3kp4ywqnjhd09",
                "expires_in": 3600,
                "server_endpoint": "https://oauth.bitrix.info/rest/",
                "status": "F",
                "client_endpoint": "https://some-domain.bitrix24.com/rest/",
                "member_id": "d41d8cd98f00b204e9800998ecf8427e",
                "application_token": "c917d38f6bdb84e9d9e0bfe9d585be73"
            }
        }
        

Request Parameters

Required parameters are marked with *

Name
type

Description

event*
string

Symbolic event code. In this case — ONAPPUPDATE

data*
object

Data about the application update.

The structure is described below

ts*
timestamp

Date and time of the event sent from the queue

auth*
object

Object containing authorization parameters and information about the account where the event occurred.

The structure is described below

Parameter data

Name
type

Description

VERSION*
string

Current installed version of the application

PREVIOUS_VERSION*
string

Previous version before the update

LANGUAGE_ID*
string

Set language: ru, en and others

Parameter auth

Name
type

Description

domain*
string

Address of the Bitrix24 account where the event occurred

scope*
string

List of permissions granted to the application, separated by spaces

access_token*
string

OAuth 2.0 authorization token

refresh_token*
string

Token for extending OAuth 2.0 authorization

expires_in*
integer

Access token lifetime in seconds

server_endpoint*
string

Address of the Bitrix24 authorization server, necessary for updating OAuth 2.0 tokens

status*
string

Status of the application that subscribed to this event:

  • L — local application
  • F — free mass-market application
  • D — demo version of a mass-market application
  • T — trial version of a mass-market application, time-limited
  • P — paid mass-market application

client_endpoint*
string

Common path for API method calls to the account

member_id*
string

Unique identifier of the account

application_token*
string

Token for secure event handling

Continue Learning