fomvasss/bitrix24-api-hook

Bitrix24 REST API 的 PHP 库

安装数量: 7,097

依赖: 0

建议者: 0

安全: 0

星星: 13

观察者: 1

分支: 4

开放问题: 0

类型:composer-package

0.1.1 2019-04-09 19:23 UTC

This package is auto-updated.

Last update: 2022-02-10 04:33:31 UTC


README

Bitrix24 REST API 的 PHP 库

安装

在命令行运行

composer require fomvasss/bitrix24-api-hook

使用

准备 Bitrix24

  1. https://www.bitrix24.com/ 注册(如果您没有账户)并确认账户
  2. 注册后获取您的 Bitrix-domain(例如: https://your-domain.bitrix24.ruhttps://your-example.bitrix24.ru,...)
  3. 登录并为您想要执行的操作创建 webhook:应用程序 → WebHook → 添加 WebHook(Приложения → Вебхуки → Добавить вебхук)。
  4. 创建 webhook 后,您将获得示例 URL: https://your-domen.bitrix24.ru/rest/13/9cybrkhzxxf28zl4/profile/

在这个类中,您需要使用以下参数:基本 URL、用户 ID、秘密密码(令牌)

  • 基本 URL - https://your-domen.bitrix24.ru
  • 用户 ID - 13
  • 密码 - 9cybrkhzxxf28zl4

使用 PHP 类

<?php
$b24 = new \Fomvasss\Bitrix24ApiHook\Bitrix24('https://testhipertin.bitrix24.ru', 13, '9cybrkhzxxf28zl4');

// see "crm.lead.add"
$b24->crmLeadAdd([
	"fields" => [
		'TITLE' => 'New contacts fomr',
		'NAME' => 'Bob Dilan',
		'EMAIL' => [
			['VALUE' => 'bob@app.com',],
		],
		'PHONE' => [
			['VALUE' => '+74563214561']
		],
		'COMMENTS' => 'Hello World',
		'UF_CRM_1554454898781' => 'Kiev',
	],
	'params' => ["REGISTER_SONET_EVENT" => "Y"],
]);

所有方法请参考 Bitrix24 文档

链接