Views: 5320
Last Modified: 22.12.2023

  Creating an app entry in Applications Marketplace

Example consists of SDK CRest and PHP file with example, both of which you need to place on your web server before adding an app to your Bitrix24. The app can retrieve Bitrix24 user authentication and use it outside Bitrix24. The app also can query REST API, getting full name of user who installed the app.

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 get/save authentication tokens into text file. These methods are not intended for app operation on several Bitrix24 accounts 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 "Users".

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)

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.

  App testing

To test your application, click on Test button in the app version or Test inside the app :

Click on the link, enter Bitrix24 address and you will be forwarded to installation procedure that fully reproduces sequence of user actions who install already published solutions.

For automatic token extension, fill out the constants in the file settings.php as follows: C_REST_CLIENT_ID (1) and C_REST_CLIENT_SECRET (2). Values for these constants This pair of keys is active for all Bitrix24 having your installed app. must be taken from app details:

Open the example's index.php in browser via your URL: the application will displays user First and Last name, retrieving them via REST API using authentication data received during app installation.




Courses developed by Bitrix24