mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-27 02:43:54 +02:00
2.3 KiB
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:
- Go to Developers in the Applications section of the sidebar
- Select Other
To work via Webhook
- Select Incoming Webhook
- 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
To work via Local Application
- Select Local Application
- 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
- Save the application key and application code
- 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)
-
Pass the received code, along with the application key and secret, to the GetToken function. Save the received access and refresh tokens
-
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