/bitrix24-php-sdk

A powerfull PHP library for the Bitrix24 REST API hacktoberfest

Primary LanguagePHPOtherNOASSERTION

bitrix24-php-sdk Build Status

License Total Downloads

A powerfull PHP library for the Bitrix24 REST API

Bitrix24 API documentation - Russian
Bitrix24 API documentation - English

Promo code for new Bitrix24 accounts

Bitrix24-PHP-SDK has a two branches

  • 1.x with 5.x php support, bugfix and minor updates only
  • 2.x only with 7.3+ php support, active work

Current master is 1.x branch

Requirements

  • php: >=5.3.2
  • ext-json: *
  • ext-curl: *
  • Monolog: optional

Example

<?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

// create a log channel
$log = new Logger('bitrix24');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::DEBUG));


// init lib
$obB24App = new \Bitrix24\Bitrix24(false, $log);
$obB24App->setApplicationScope($arParams['B24_APPLICATION_SCOPE']);
$obB24App->setApplicationId($arParams['B24_APPLICATION_ID']);
$obB24App->setApplicationSecret($arParams['B24_APPLICATION_SECRET']);
 
// set user-specific settings
$obB24App->setDomain($arParams['DOMAIN']);
$obB24App->setMemberId($arParams['MEMBER_ID']);
$obB24App->setAccessToken($arParams['AUTH_ID']);
$obB24App->setRefreshToken($arParams['REFRESH_ID']);

// get information about current user from bitrix24
$obB24User = new \Bitrix24\User\User($obB24App);
$arCurrentB24User = $obB24User->current();

Installation

Add "mesilov/bitrix24-php-sdk": "dev-master" to composer.json of your application. Or clone repo to your project.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

License

bitrix24-php-sdk is licensed under the MIT License - see the MIT-LICENSE.txt file for details

Author

Maxim Mesilov - mesilov.maxim@gmail.com - https://twitter.com/mesilov
See also the list of contributors which participated in this project.

Need custom Bitrix24 application?

email: mesilov.maxim@gmail.com