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
API インターフェイスとして、JavaScript / curl コマンドライン / 任意のHTTPアクセスプログラムが利用できます。以下のサンプルは共に、会議室の登録情報をJSON形式で取得する事ができます。
In an environment where regular SSL is not applied, the server URL will be HTTP port 8080.
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
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.

Message API
sendMessage
Send a message.
sample
Send by messenger with user ID
let response = await getAPIClient().sendMessage(
"messenger", // messenger を指定したダイレクトメッセージを指定
"Hello!", // 送信するメッセージ
false, // 封書は off
["user1@xxx.com", "user2@xxx.com"] // 宛先 Email アドレス
);
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(
"ルーム名",
"Hello!",
false,
["user1@xxx.com", "user2@xxx.com"] // メンションとして Email アドレス指定
);
curl -H "x-cam-apiToken:token******" -d message="{\"panelName\":\"ルーム名\",\"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.
json files should be saved with the character code UTF8.
sample
curl -H "x-cam-apiToken:token******" -d @messages.json ${serverURL}/sendMessages
messages=[
{"message":"こんにちは 1","property":{"users":"user1@test.com,user2@test.com"}},
{"message":"こんにちは 2","property":{"users":"user1@test.com,user2@test.com"}},
{"message":"こんにちは 3","property":{"users":"user1@test.com,user2@test.com"}},
{"message":"こんにちは 4","property":{"users":"user1@test.com,user2@test.com"}},
]
messages=[
{"send": "test", "message":"テスト 1"}
]
Call API
Quick Web Conference Create a URL.
createQuickCall
sample
let response = await getAPIClient().createQuickCall(
1624368868714, // クイック会議の期限(UnixTimeミリ)
"password!", // クイック会議のパスワードを指定
);
argument (e.g. function, program, programme)
expiredDate | Specify the deadline (UnixTime milli) for the quick meeting |
title | 会議画面に表示されるタイトルを設定 ※ ブランクの場合は、表示されない |
password | Specify password for quick meeting ※ ブランクの場合は、パスワード無しの会議URLが作成される |
レスポンス
sid | Web会議ID |
url | Web会議URL |
presenterPass | 視聴のみモードの会議を生成した場合に、プレゼンターが必要になるパスワード |
自動ログイン
createQuickCall で生成した会議URLに自動でログインするには、次のようにURLパラメータに userName、password を連結してアクセスしてください。
https://app.chat-messenger.com/share/{Web会議ID}?userName=太郎&password=000
getCallStats
Web会議の現在の参加者数などステータスを返却します。
sample
let response = await getAPIClient().getCallStats(
8sQYFO2sPYHb7xSsibpVCKaqrFmTpCureVqKvwKgSZJs, // Web会議のID
);
argument (e.g. function, program, programme)
roomName | Web会議のIDを指定、クイック会議の場合はSID |
レスポンス
roomName | Web会議ID |
title | Web会議件名 |
creationDate | 作成日時 |
expiredDate | 有効期限 |
participants | 現在の参加者数 |
inProgress | 会議が進行中の場合は true、そうでない場合は false |
User API
The User API only provides the curl command, and requires administrator privileges to run it.
exportUsers
User information will be downloaded in CSV format to the location specified by path.
sample
curl -H "x-cam-apiToken:token******" -d "path=exportUsers.csv" ${serverURL}/exportUsers
updateUsersCSV
Update user information in bulk from a CSV file. * See CSV format
sample
curl -H "x-cam-apiToken:token******" -F "file=@updateUsers.csv" ${serverURL}/updateUsersCSV
ChatRoom API
updateChatRoom
Create and update chatrums
sample
let chatRoom = {
"id":"1564831284702237059",
"name":"秘密会議"
"createUserId":"11u1pu9d32p8vuvjoZdd",
"adminUserId":"11u1pu9d32p8vuvjoZdd",
"isPublic":false,
"memberUids":{
"11u1pu9d32p8vuvjoZdd":true,
"1lmn7hoh3s1ja26fsazw":true,
"hhx10sfdv1jyou4la1ny":true,
"3400w9rfvs504c35dt99":true,
"309d32p8vuvjo5euuuwx":true
},
}
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 |
|
Schedule API
getConferenceMaster
Retrieves the master list of meeting rooms.
sample
let response = await getAPIClient().getConferenceMaster();
let errors = response['errors'];
if (errors) {
console.log(errors);
return;
}
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"]);
argument (e.g. function, program, programme)
yyyyMMdd |
|
API のエラー判定
API のエラー判定は、次の通り判定してください。
HTTPステータスが200以外
HTTPステータスが200以外の場合は、例外なくエラーです。
HTTPステータスが200だが、サーバでエラー
APIトークンが不正や、対象データが存在しない場合などは、HTTPステータスそのものは200で返却され、レスポンス中の status が 520 で判定可能です。また errors にはエラー原因の code と message が配列で格納されます。
{"status":520, "errors":[{"code":"805","message":"APIトークンが正しくありません"}]}
code の意味と、同時に返却される message の詳細は以下です。
code | 意味 | message |
---|---|---|
400 | クライアント側の不正なリクエスト | このリクエストは無効です。 |
405 | 存在しないグループ | – |
406 | グループ変更ができない | – |
451 | ユーザが登録されていない | ユーザが登録されていません。先にユーザ登録してください。 ※ユーザが自身で登録できる場合 |
452 | ユーザが登録されていない | ユーザが登録されていません。 |
490 | ログイン施行回数を超過した | パスワード試行回数の上限に達しためログインできません。しばらく時間をおいてから再度お試しください。 |
491 | リクエスト回数が多すぎる | – |
500 | 予期せぬサーバ起因のエラー | – |
503 | サービスが利用できない | – |
800 | 管理者専用機能のため利用できない | この機能は管理者しか利用できません。 |
802 | API専用機能のため利用できない | この操作はAPIのみで利用可能です。 |
805 | APIトークン不正 | APIトークンが正しくありません。 |