定制 frankkessler/incontact-laravel-oauth2-rest 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

frankkessler/incontact-laravel-oauth2-rest

Composer 安装命令:

composer create-project frankkessler/incontact-laravel-oauth2-rest

包简介

An inContact REST api wrapper utilizing oAuth2

README 文档

README

Travis CI Build Status Coverage Status StyleCI Latest Stable Version

INSTALLATION

To install this package, add the following to your composer.json file

frankkessler/incontact-laravel-oauth2-rest: "0.2.*"

LARAVEL 5 SPECIFIC INSTALLATION TASKS

Add the following to your config/app.php file in the providers array

Frankkessler\Incontact\Providers\IncontactLaravelServiceProvider::class,

Add the following to your config/app.php file in the aliases array

'Incontact'    => Frankkessler\Incontact\Facades\Incontact::class,

Run the following command to pull the project config file and database migration into your project

php artisan vendor:publish

Run the migration

php artisan migrate

##OPTIONAL INSTALLATION

Logging is enabled by default if using Laravel. If not, add the following to the $config parameter when initializing the Incontact class. (This class must implement the Psr\Log\LoggerInterface interface.)

'incontact.logger' => $class_or_class_name

#TOKEN SETUP

Currently, this package only supports the username/password flow for oauth2.

To get started, you'll have to setup an Application in Incontact.

  1. Navigate to Manage -> API Applications
  2. Click "Create API Application"
  3. Select "Register Internal Application"
  4. Fill out the form keeping in mind that your OAUTH_CONSUMER_TOKEN will be [APPLICATION_NAME]@[VENDOR_NAME]
  5. Save and find your business unit if which will be your OAUTH_CONSUMER_SECRET.

Now that you have your Consumer Token and Consumer Secret, add them to your .env file:

INCONTACT_OAUTH_DOMAIN=api.incontact.com
INCONTACT_OAUTH_CONSUMER_TOKEN=[APPLICATION_NAME]@[VENDOR_NAME]
INCONTACT_OAUTH_CONSUMER_SECRET=BUSINESS_UNIT_NUMBER
INCONTACT_OAUTH_SCOPES=RealTimeApi AdminApi ReportingApi
INCONTACT_OAUTH_USERNAME=YOUR_INCONTACT_USERNAME
INCONTACT_OAUTH_PASSWORD=YOUR_INCONTACT_PASSWORD

EXAMPLES

AdminApi

Get Agents

$incontact = new \Frankkessler\Incontact\Incontact();

$result = $incontact->AdminApi()->agents();

foreach($result['agents'] as $record) {
    $agentId =  $record['AgentId'];
}

ReportingApi

Get Call by Contact Id

$incontact = new \Frankkessler\Incontact\Incontact();

$result = $incontact->ReportingApi()->contact('9999999999');
                                      
foreach($result as $record) {
    $contactId = $record['contactId'];
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固