Archive with example contains SDK CRest and two files. They comprise a finished app that queries REST API, integrates pop-up dialogs into contact lists within CRM companies as well as displays CRM object selected by user.
Attention! This example works based on SDK CRest. Before using this example, open the file checkserver.php via browser and check if your server settings are correct. You need to inherit CRest class for actual public application by re-defining methods getSettingData/setSettingData, that are get/save authentication tokens into text file. These methods are not intended for app operation on several Bitrix24 simultaneously. Learn more.
Download the archive:
To create a solution to be further published in Application catalog, select
New application
and choose an area for publishing your future new app inside your own developer's account. The new slider menu allows you to
choose or create
a new app version:
Fill out the available sections (1) for this example by inputting "CRM", "Users", "Application embedding".
Contrary to local applications, public apps have versions. Each version is submitted for moderation. (During moderation, app description is checked as well). Moderation is not required at the development and testing stage, you are developing and finalizing your app's fully featured package, including
test instances
on your Bitrix24 accounts and only after that you should submit your app to be moderated by Bitrix24 team.
When creating a new solution you need to fill out the app name (1), app ID code (2), categories (3), app description (4), price policy (5) and click test (6):
Description of required fields (click on plus symbol)
Contrary to local applications, each public app must have a unique character ID code. This code consist of two parts: your unique partner ID (indicated inside partner account) and part you assign to a specific created application (2 see image above).
Note: your app ID code must be clear and legible from the very start. Please, be aware that this specific code will be a part of your app's public address in Application catalog and you won't be able to replace it later.
To simplify things, you can temporarily indicate that your app is free of charge (5). Later, before submitting this app to moderators you can change this status and update other descriptions accordingly.
Click on a block with one of languages in Application description (4) and fill out the required fields with descriptions, as well as upload solution logo and at least one screenshot. It's not absolutely required to input actual and finalized descriptions as well as final screenshots ща the app at the development stage. However, later on when you decide to submit a completed and debugged solution application to Bitrix24 moderators to be published in Applications catalog, these fields must be filled out with actual full information.
From the very start, you can choose a category for your app (3). Such categories help users to navigate in the
Applications catalog
.
Proceed to saving app details, by filling all the required fields. First step is complete, i. e. you have prepared description portion of your future application.
Application testing
To test your application, click on
Test button in the app version
or
Test inside the app
:
Indicate the Bitrix24 test account (1) and click on "Install" (2). After Bitrix24 app is installed, you will see "Application not found" message. It's a normal situation, because our example has enabled "Use Rest API" option and the app hasn't been published in a public catalog yet. When your app becomes available in the Applications catalog, Bitrix24 will keep user at the app description page.
Go to the list of contacts or companies. Any contact or company context menu has "Applications" submenu that now has the item
"Public embedded form"
, that opens slider with application.
Application
shows debugging information
about passed authentication data of current user, as well as contact (or company, when calling it from CRM company list) data. The app gets such data via REST API using the authentication data. Because this application works within Bitrix24 interface and uses authentication of current user who has opened this app, the app works exclusively within this user access permissions.