oihso/php-bitrix24-api-module 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oihso/php-bitrix24-api-module

Composer 安装命令:

composer require oihso/php-bitrix24-api-module

包简介

This library allows you to use Bitrix24 REST API. An authentication module is included in this library.

README 文档

README

A basic PHP library for the Bitrix24 REST API. An authentication module is included.

Bitrix24 Documentation

Russian documentation
English documentation

Requirements

  • php: >=7.0.0
  • ext-json: *
  • ext-curl: *
  • ext-mysqli: *

Example

<?php
use Bitrix24API\Bitrix24;

$Bitrix24 = new Bitrix24(
    array(
        'companyDomain' => 'example.bitrix24.com', //Bitrix24 company URL
        'scope' => 'crm,user,telephony', //Bitrix24 auth scopes. Available variants: https://training.bitrix24.com/rest_help/rest_sum/premissions_scope.php

        //Auth data
        'auth' => array(
            //Bitrix24 User auth data
            'login'    => 'user@bitrix24.com',
            'password' => '1234',

            //Bitrix24 App auth data
            'clientId' => 'local.55a6ca262e8482.12345678',
            'clientSecret' => 'eOk9XtOWbdTjUgQmBL1MYNpKl0Jwt11JLHYHIADX62f3c6PA29'
        ),

        //Database config
        'database' => array(
            'settingsTableName' => 'config',
            'settingsKeyName' => 'key',
            'settingsValueName' => 'value'
        )
    ),
    array(
        '127.0.0.1', //MySQL Host
        'user',	//MySQL Username
        '1234',	//MySQL Password
        'db', //MySQL Database
        3306 //MySQL Port
    ) //Database connection
);

//Gets deal with DEAL_ID = '1234'
$dealData = $Bitrix24->callMethod("crm.deal.get", array('id'=>'1234'));

What is settingsKeyName and settingsValueName values?

PHP Bitrix24 API Module uses standard key-value pair table to store data. Here is an example
If you have another names for key-value pairs (for example: option as key - config as value), you need to specify this names in config. Otherwise the library will not work.

Installation

  1. Install library in your project: composer require oihso/bitrix24-api-module
  2. Create new table (or use an existing one) to store settings. The table must be key-value type. Key and value must be TEXT fields
  3. Add the row "php_bitrix24_auth_time" = "0" to the table
  4. Add the row "php_bitrix24_auth_code" = "code" to the table

How to configure your Bitrix24

  1. Go to Applications -> Add application -> My account only -> Add and create app with Only API checkmark. Also you need to select all needed scopes
  2. Copy client_id and client_secret and paste it into Bitrix24 class config
  3. On the left-side menu go to Invite users and register new user. It will be your "service" account for REST API
  4. Create new group/department for your new "service" account
  5. Set up permissions for this group/department. You need to allow administrative rules for this account.
  6. Now, you can paste user's credentials into Bitrix24 class config

License

"PHP Bitrix24 API Module" is licensed under the Apache License - see the LICENSE.txt file for details

oihso/php-bitrix24-api-module 适用场景与选型建议

oihso/php-bitrix24-api-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 01 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 oihso/php-bitrix24-api-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 oihso/php-bitrix24-api-module 我们能提供哪些服务?
定制开发 / 二次开发

基于 oihso/php-bitrix24-api-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-01-14