Event After Successful Application Installation OnAppInstall
Scope:
basicWho 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 |
Description |
|
event* |
Symbolic event code. In this case — |
|
data* |
Data about the installed application. The structure is described below |
|
ts* |
Date and time of the event sent from the queue |
|
auth* |
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 |
Description |
|
LANGUAGE_ID* |
Installed language: |
|
VERSION* |
Version of the installed application |
|
ACTIVE* |
Status of the application's activity. Possible values: |
|
INSTALLED* |
Whether the application is ready for use. Possible values: |
Parameter auth
Required parameters are marked with *
|
Name |
Description |
|
domain* |
Address of the Bitrix24 account |
|
server_endpoint* |
Authorization server address for token renewal |
|
status* |
Status of the application that subscribed to this event:
|
|
client_endpoint* |
Common path for API method calls to the account |
|
member_id* |
Unique identifier of the account |
|
application_token* |
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
- Event Handler
- Register a new event handler event.bind
- Event on Application Payment onAppPayment
- Event on Receiving Permission for Using onAppMethodConfirm Methods
- Event onUserAdd
- Event on Application Uninstallation: onAppUninstall