Event After Successful Application Installation OnAppInstall

Scope: basic

Who can subscribe: any user

The OnAppInstall event is triggered immediately after the successful installation of an application on Bitrix24. The application_token is passed to the handler, which is important to save. For more details, refer to the article Security in Handlers.

Events will not be sent to the application until the installation is complete. Check the application installation

What the Handler Receives

Data is transmitted as a POST request

{
            "event": "ONAPPINSTALL",
            "data": {
                "VERSION": "1.0.0",
                "ACTIVE": "Y",
                "INSTALLED": "Y",
                "LANGUAGE_ID": "en"
            },
            "ts": "1696527000",
            "auth": {
                "domain": "some-domain.bitrix24.com",
                "server_endpoint": "https://oauth.bitrix.info/rest/",
                "status": "F",
                "client_endpoint": "https://some-domain.bitrix24.com/rest/",
                "member_id": "a223c6b3710f85df22e9377d6c4f7553",
                "application_token": "51856fefc120afa4b628cc82d3935cce"
            }
        }
        

Request Parameters

Required parameters are marked with *

Name
type

Description

event*
string

Symbolic event code. In this case — ONAPPINSTALL

data*
object

Data about the installed application.

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

Required parameters are marked with *

Name
type

Description

LANGUAGE_ID*
string

Installed language: en, de, and others

VERSION*
integer

Version of the installed application

ACTIVE*
string

Status of the application's activity.

Possible values:
Y — active
N — inactive

INSTALLED*
string

Whether the application is ready for use.

Possible values:
Y — ready
N — not fully installed

Parameter auth

Required parameters are marked with *

Name
type

Description

domain*
string

Address of the Bitrix24 account

server_endpoint*
string

Authorization server address for token renewal

status*
string

Status of the application that subscribed to this event:

  • L — local application
  • F — free mass-market application
  • S — subscription 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

The handler for this event can be set in the installation script of the application, which is specified in the version card in a separate field.

Continue Your Learning