API Linkage
By using Chat&Messenger API, you can easily link with external systems and programs.
The API linkage enables the following processing.
- Linkage with internal systems and notification of business data to chat rooms
- Detects system errors and notifies relevant personnel
- Web conference linkage from internal groupware
- Obtain schedule and meeting room reservation information and link to other systems
API Token and API Interface
Obtaining an API Token from the administration screen
When performing API linkage, first obtain an API Token.
Pass the obtained apiToken / serverURL to JavaScript / curl as described in "API Interface" below.
API Interface
JavaScript / curl command line is available as an API interface. Both of the following samples can retrieve meeting room registration information in JSON format.
JavaScript
let config = { "apiToken": "QIQVOSvRJHrQElDwj20x******",. "serverURL": "https://*****************" } let client = new CAMAPIClient(config); let response = await client.getConferenceRooms();
curl command line
curl -H "x-cam-apiToken:token******" ${serverURL}/getConferenceRooms
The serverURL for on-premise environment is HTTP port 8080.
Any HTTP access program
Any HTTP access program can be linked.
API Sample Screens
We have a sample URL where you can easily test API execution. If you would like to use it for testing, please contact us through Contact Us.
API
sendMessage
Send a message.
sample
- Send by messenger with user ID
let response = await getAPIClient().sendMessage( "messenger", // direct message specifying messenger "Hello!", // message to send false, // Envelope is off ["user1@xxx.com", "user2@xxx.com"] // destination Email address );
curl -H "x-cam-apiToken:token******" -d message="{\"panelName\":\"messenger\",\"message\":\"Hello\",\"isOpened\":false,\" generalPurposes\":{\"users\":\"user1@xxx.com,user2@xxx.com\"}}" ${serverURL}/sendMessage
- Send by specifying a chat room
let response = await getAPIClient().sendMessage( sendMessage( "Room name", "Hello! "Hello!", false, ["", ""] // Specify an email address as a message. ["user1@xxx.com", "user2@xxx.com"] // specify an Email address as a Mention );
curl -H "x-cam-apiToken:token******" -d message="{\"panelName\":\"roomName\",\"message\":\"Hello\",\"isOpened\":false,\"generalPurposes \":{\"users\":\"user1@xxx.com,user2@xxx.com\"}}" ${serverURL}/sendMessage
argument (e.g. function, program, programme)
send |
|
users |
|
message |
|
seal |
|
sendMessages
Sends a batch message from a json file.
sample
- curl command line
curl -H "x-cam-apiToken:token******" -d @messages.json ${serverURL}/sendMessages
- Sample messages.json file for sending by direct message
messages=[[. {"message": "Hello 3", "property":{"users": "user1@test.com,user2@test.com"}}, {"message": "Hello" 3 {"message": "Hello 4", "property":{"users": "user1@test.com,user2@test.com"}}, {"users": "user1@test.com,user2@test.com"}} ]
- Sample messages.json file for sending to all participants in a chat room test
messages=[[. {"send": "test", "message": "test 1"} ]
createQuickCall
Quick Web Conference Create a URL.
sample
- Create a quick meeting URL.
let response = await getAPIClient().createQuickCall( 1624368868714, // quick conference deadline (UnixTime mm) "password!", // quick conference password (UnixTime mm );
argument (e.g. function, program, programme)
expiredDate |
|
password |
|
updateChatRoom
Create and update chatrums
sample
let chatRoom = { "id": "1564831284702237059",. name": "Secret meeting", "name": "Secret meeting" "createUserId": "11u1pu9d32p8vuvjoZdd",. "isMessageThread":true,. "isPublic":false,. "memberUids":{ "11u1pu9d32p8vuvjoZdd":true, "memberUids":{ "hhx10sfdv1jyou4la1ny":false, "hhx10sfdv1jyou4la1ny":false, "hhx10sfdv1jyou4la1ny":false "309d32p8vuvjo5euuuwx":false }, } } let response = await getAPIClient().updateChatRoom(chatRoom); let errors = response['errors']; if (errors) { console.log(errors); return; } } console.log(response["chatRoom"]);
argument (e.g. function, program, programme)
chatRoom |
|
getConferenceMaster
Retrieves the master list of meeting rooms.
sample
Obtain a master list of meeting rooms
let response = await getAPIClient().getConferenceMaster(); let errors = response['errors']; if (errors) { console.log(errors); return; } } console.log(response["conferenceRooms"]); console.log(response["conferenceRooms"]); }
argument (e.g. function, program, programme)
without
getConferenceRoomStatus
Retrieve a list of meeting room reservations
sample
let response = await getAPIClient().getConferenceRoomStatus("201908"); let errors = response['errors']; if (errors) { console.log(errors); return; } } console.log(response["conferenceRoomStatus"]); console.log(response["conferenceRoomStatus"]); }
argument (e.g. function, program, programme)
yyyyMMdd |
|