This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Jasmine Anteunis edited this page Jan 15, 2019
·
5 revisions
SAP Conversational AI official SDK in PHP
This module is a wrapper around the SAP Conversational AI API, and allows you to:
Install the package using npm, as shown below:
composer require sapcai/sdk-php
You can now use the SDKin your code. All you need is your bot's token. In case you have enabled our versioning feature in the settings of your bot, you can refer to our versioning documentation to learn how to select the appropriate token for you versions and environments.
Using the entire SDK:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Sapcai\Client;
$client = new Client('YOUR_TOKEN');
Extracting one single API:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Sapcai\Client;
$request = Client::Request('YOUR_TOKEN');
$connect = Client::Connect('YOUR_TOKEN');
You can view the whole API reference at cai.tools.sap/docs/api-reference.