1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-27 02:43:54 +02:00
OpenIntegrations/docs/en/md/Instructions/Bitrix24.md
2024-06-21 06:43:00 +00:00

2.3 KiB

id sidebar_class_name
Bitrix24 Bitrix24

<img src={require('../../static/img/APIs/Bitrix24.png').default} width='64px' />

Bitrix24

This section is dedicated to the library for working with Bitrix24 API. On this page, all the steps necessary to start working are described

Getting started

There are two ways to work with Bitrix24 via API: via Webhook and via local application. For both options you need:

  1. Go to Developers in the Applications section of the sidebar

BF

  1. Select Other

BF



To work via Webhook

  1. Select Incoming Webhook

BF

  1. Fill in the necessary permissions in Permissions Settings and save the URL of the webhook. This will be used to execute library methods as the URL parameter. The optional Token parameter will always remain empty in this case

BF



To work via Local Application

  1. Select Local Application

BF

  1. Select the path of the handler (if the application does not imply authorization of other users, but only Bitrix management through one administrator account, you can choose any address, for example https://localhost), tick Use only API (if you need only the functionality of calling library methods) and fill in the necessary permissions

BF

  1. Save the application key and application code

BF

  1. Using the application key, call the GetAppAuthLink function and follow the received link in the browser. After authorization, copy the received code from the address bar (or get it to the handler whose address was specified in point 2)

BF

  1. Pass the received code, along with the application key and secret, to the GetToken function. Save the received access and refresh tokens

  2. Tokens have a limited lifetime. To get a new token, you can use the UpdateToken function, passing here the refresh token, key and application secret. The refresh creates not only a new access token, but also a refresh token as well