Use this API to register client callback Authentication methods using oAuth or Basic Authentication.
- Conversation Manager
- V3
Conversation Manager APIs
This section provides the requisite APIs needed to create Conversation Manager accounts and to configure conversation workflows. To create the Conversation Manager acccount, use the Conversation APIs in this order when setting up a complete eGain application:
- Authentication
- Client Application
- Participant
- Channel
- Orchestration
- Account
After the account is created you can use the following APIs to send / receive messages.
- Conversation
- Asset
Note: You can configure your system to use third party Bots and third party Channels. The API instructions provided here assume you are using eGain's application setup.
Request
API to register new Client Applications that can integrate with the Conversation Hub. Client applications are used to send and receive messages. New Account API process flow: Authenticiation > Client Application > Participant > Channel > Orchestration > Account
Client application must have 'app.conversation.conversationmgr.manage' scope assigned.
Register new client application
Client aplication type
Conversation Hub will send payload which is specific to this version.
Callback API to recieve messages from Conversation Hub sent by various participants in conversation. Callback APIs needs to respond within 5 seconds. We strongly recommend to process message asynchronously. API must return 401 if Authorization header is expired, Conversation Hub will generate new Authorization header on 401.
If client application callback is not reachable, Conversation Hub sends a notification to this email address
Custom headers for callback, Conversation Hub will include these while sending message to callback
- Production Serverhttps://api.egain.cloud/conversation/conversationmgr/v3/clientapplications
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.egain.cloud/conversation/conversationmgr/v3/clientapplications \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "custom_bot_client_application_1",
"description": "Client app for Eva bot",
"active": true,
"roles": [
{
"name": "custom_bot",
"version": "v3",
"callback": "https://example.support.com/messaging/customBot",
"notificationEmail": "client_app_admin@example.com",
"headers": [
{
"name": "X-custom-header",
"value": "xyz"
}
],
"authentication": {
"id": "34fbb53f-ed7f-48d4-b545-e26cc95e075d"
}
}
]
}'{ "id": "9e1d7993-cc82-4d5f-a193-0d6b0d48a959" }
- Production Serverhttps://api.egain.cloud/conversation/conversationmgr/v3/clientapplications
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.egain.cloud/conversation/conversationmgr/v3/clientapplications \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "clientApplication": [ { … }, { … } ] }
- Production Serverhttps://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/7b6c5fff-036e-4a40-b68a-a67c592fc079 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
Client aplication type
Conversation Hub will send payload which is specific to this version.
Callback API to recieve messages from Conversation Hub sent by various participants in conversation. Callback APIs needs to respond within 5 seconds. We strongly recommend to process message asynchronously. API must return 401 if Authorization header is expired, Conversation Hub will generate new Authorization header on 401.
If client application callback is not reachable, Conversation Hub sends a notification to this email address
Custom headers for callback, Conversation Hub will include these while sending message to callback
{ "id": "9e1d7993-cc82-4d5f-a193-0d6b0d48a959", "name": "custom_bot_client_application_1", "description": "Client app for Eva bot", "active": true, "roles": [ { … } ] }
Update Client application
Client aplication type
Conversation Hub will send payload which is specific to this version.
Callback API to recieve messages from Conversation Hub sent by various participants in conversation. Callback APIs needs to respond within 5 seconds. We strongly recommend to process message asynchronously. API must return 401 if Authorization header is expired, Conversation Hub will generate new Authorization header on 401.
If client application callback is not reachable, Conversation Hub sends a notification to this email address
Custom headers for callback, Conversation Hub will include these while sending message to callback
- Production Serverhttps://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/7b6c5fff-036e-4a40-b68a-a67c592fc079 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "custom_bot_client_application_1",
"description": "Client app for Eva bot",
"active": true,
"roles": [
{
"name": "custom_bot",
"version": "v3",
"callback": "https://example.support.com/messaging/customBot",
"notificationEmail": "client_app_admin@example.com",
"authentication": {
"id": "34fbb53f-ed7f-48d4-b545-e26cc95e075d"
}
}
]
}'- Production Serverhttps://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://api.egain.cloud/conversation/conversationmgr/v3/clientapplications/7b6c5fff-036e-4a40-b68a-a67c592fc079 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'