PHPackages                             motuo/call-watson-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. motuo/call-watson-api

ActiveLibrary[API Development](/categories/api)

motuo/call-watson-api
=====================

Call Watson API(Assistant and Discovery Service)

1.1(7y ago)032MITPHPPHP &gt;=7.0.0

Since Nov 15Pushed 7y agoCompare

[ Source](https://github.com/motuo1201/call-watson-api)[ Packagist](https://packagist.org/packages/motuo/call-watson-api)[ RSS](/packages/motuo-call-watson-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Call Watson API for Assistant and Discovery
===========================================

[](#call-watson-api-for-assistant-and-discovery)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/a3d670659f653bef113271137aeb272265a7120e2a2af0056c4f8fd1fe9f4b93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f74756f2f63616c6c2d776174736f6e2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/motuo/call-watson-api)[![Total Downloads](https://camo.githubusercontent.com/b62d664be5c492a00fc22a70a815266e9eac867a2e5f838c4599f89f8ada5c4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f74756f2f63616c6c2d776174736f6e2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/motuo/call-watson-api)

`motuo/call-watson-api` is a laravel package providing easy cooperation to Watson Such as:

- Call Watson Assistant API(Get response to user input)
- Call Watson Discovery Service API

Japanese Document
日本語記事は[こちら](https://qiita.com/motuo/items/27b7f50fba64c1dd149f)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require motuo/call-watson-api
```

If you are using Laravel 5.5, the service provider will automatically be discovered.

Publish config file

```
php artisan vendor:publish
```

and choose

```
Provider: motuo\CallWatsonAPI\CallWatsonServiceProvider

```

Add API credentials to `.env` file like this as you need.

```
WATSON_ASSISTAN_API_URL="https://gateway-fra.watsonplatform.net/assistant/api"
WATSON_ASSISTANT_VERSION="2018-07-10"
WATSON_ASSISTANT_WORKSPACEID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WATSON_ASSISTANT_USER_NAME=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WATSON_ASSISTANT_PASSWORD=xxxxxxxxxxxx

WATSON_DISCOVERY_API_URL="https://gateway-fra.watsonplatform.net/discovery/api"
WATSON_DISCOVERY_VERSION="2018-10-15"
WATSON_DISCOVERY_ENV_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WATSON_DISCOVERY_COLLECTION=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WATSON_DISCOVERY_USER_NAME=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WATSON_DISCOVERY_PASSWORD=xxxxxxxxxxxx
```

Usage
-----

[](#usage)

### Call Watson Assistant

[](#call-watson-assistant)

Example

```
