Event on the Administrator's Decision on a Request for a Method Requiring Confirmation onAppMethodConfirm

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 ONAPPMETHODCONFIRM event is triggered when the Bitrix24 administrator allows or denies the application a call to a method requiring confirmation. The event is sent only to the application that requested the permission.

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": "ONAPPMETHODCONFIRM",
            "event_handler_id": "15",
            "data": {
                "TOKEN": "fkp963yuv1ggkfbs5z3f5hy8lilm0iw6",
                "METHOD": "voximplant.user.get",
                "CONFIRMED": "1",
                "LANGUAGE_ID": "de"
            },
            "ts": "1478790852",
            "auth": {
                "domain": "portal.bitrix24.com",
                "client_endpoint": "https://portal.bitrix24.com/rest/",
                "server_endpoint": "https://oauth.bitrix.info/rest/",
                "member_id": "74ef8a46a75104de55d5d4a61b98ab6d",
                "application_token": "c289487163b58658eae5e8b42eaf11b8"
            }
        }
        

Request Parameters

Required parameters are marked with *

Name
type

Description

event*
string

Event character code — ONAPPMETHODCONFIRM

event_handler_id
integer

Event handler ID

data*
object

Data about the administrator's decision on the method.

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

TOKEN*
string

The access_token value with which the application called the method and requested permission. The administrator's decision is retained for this token

METHOD*
string

API method for which permission was requested

CONFIRMED*
string

Permission result: 0 — denied, 1 — granted

LANGUAGE_ID*
string

Default language of the Bitrix24 account: ru, en and others

Parameter auth

Name
type

Description

domain*
string

Address of the Bitrix24 account where the event occurred

server_endpoint*
string

Authorization server address for token renewal

client_endpoint*
string

Common path for API method calls to the account

member_id*
string

Unique identifier of the account

application_token*
string

Application token. Compare it with the token retained during installation to make sure the request came from Bitrix24. For more details, see the article Security in Handlers

Unlike onAppInstall, this event is sent without user authorization: auth does not contain the access_token, refresh_token, expires_in, scope, and status keys.

If CONFIRMED equals 1, repeat the method call with the token from data.TOKEN before it expires.

Continue Learning