사전에 생성하신 Knox Portal 비실명계정을 발신자로 하여 Knox Messenger 내에서
대화방을 생성하고 메시지를 발신할 수 있습니다.
발신계정을 챗봇 타입으로 생성하시고 수신API 구축하시면 메시지를 수신하실 수도 있습니다..
| API | URI | Method | Description |
|---|
| 메신저 연락처 추가 | /messenger/contact/api/v1.0/contact/o1/user | POST | 메신저 연락처에 친구를 등록한다. |
| 메신저 연락처 삭제 | /messenger/contact/api/v1.0/contact/o1/user/delete | POST | 메신저 연락처에 친구를 삭제한다. |
| 메신저 연락처 리스트 조회 | /messenger/contact/api/v1.0/contact/o1/list | GET | 메신저 연락처 등록된 리스트를 조회한다. |
| 메신저 User ID 검색 | /messenger/contact/api/v1.0/profile/o1/search/loginid | POST | Knox Portal ID로 메신저 내부 User ID를 검색한다. |
| 메신저 Device 등록 | /messenger/contact/api/v1.0/device/o1/reg | GET | 연계시스템 발신계정에 대한 메신저 Device를 등록한다. |
| 메신저 Device 해지 | /messenger/contact/api/v1.0/device/o1/delete | POST | 연계시스템 발신계정에 대한 메신저 Device를 해지한다. |
| 메신저 Device 사용정보 조회 | /messenger/contact/api/v1.0/device/o1/use/info | POST | 본인 또는 타인의 메신저 Device별 사용정보를 조회한다. |
| 파일서버 암호화 Key 조회 | /messenger/file/api/v1.0/file/v1/getCurrentTime | GET | 파일 업로드/다운로드 API 사용을 위한 암호화 Key를 조회한다. |
| 파일 업로드 | /messenger/file/api/v1.0/file/v1s/file/{filename} | PUT | 첨부파일을 업로드한다. |
| 파일 다운로드 | /messenger/file/api/v1.0/file/v1s/file/{file_id} | GET | 첨부파일을 다운로드한다. |
| 메시지서버 암호화 Key 조회 | /messenger/msgctx/api/v1.0/key/getkeys | GET | 메시지서버의 Body 암호화용 Key를 조회한다. |
| 대화방 참여자정보 조회 | /messenger/msgctx/api/v1.0/chat/activemember | GET | 특정 대화방의 참여자수와 User ID를 조회한다. |
| 대화방 생성 | /messenger/message/api/v1.0/message/createChatroomRequest | POST | 신규 대화방을 생성한다. |
| 메시지 발신 | /messenger/message/api/v1.0/message/chatRequest | POST | 대화방에 메시지를 발신한다. |
| 대화상대 초대 | /messenger/message/api/v1.0/message/inviteRequest | POST | 대화방에 대화상대를 초대한다. |
| 대화상대 내보내기 | /messenger/message/api/v1.0/message/removeMemberRequest | POST | 대화방에서 대화상대를 내보낸다. |
| 대화방 삭제 | /messenger/message/api/v1.0/message/destroyChatroomRequest | POST | 대화방을 삭제한다. |
| 메시지 발신취소 | /messenger/message/api/v1.0/message/recallMessageRequest | POST | 발신된 메시지를 발신취소한다. |
| 대화방명 변경 | /messenger/message/api/v1.0/message/changeChatroomMetaRequest | POST | 대화방 이름을 변경한다. (방장만 가능) |
| 방장 변경 | /messenger/message/api/v1.0/message/changeOwnerRequest | POST | 대화방의 방장을 변경한다. (방장만 가능) |
| 대화방 나가기 | /messenger/message/api/v1.0/message/endChatRequest | POST | 대화방을 나간다. |
| 메시지 읽음 Count 조회 | /messenger/message/api/v1.0/message/messageReadCountRequest | POST | 발신된 메시지의 읽음 Count를 조회한다. |
/messenger/contact/api/v1.0/contact/o1/user
연락처에 친구 추가. 자통법 대상자는 친구 추가 불가 및 blocklist로 결과 반환.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json | |
| 6 | 연락처에 등록할 contactList | contactList | y | Body | List | ||
| 7 | 연락처에 등록할 userID | contactList.userID | y | Body | Long | 1010101010101 |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 연락처에 등록된 userID 리스트 | contactList | List | ||
| 연락처에 등록된 userID | userID | Long | 1010101010103 |
Sample
| Request | Response |
|---|
POST /messenger/contact/api/v1.0/contact/o1/user HTTP/1.1 Host : yyy.xxxxxx.com { “contactList” : [ { “userID” : 10101010101 }, { “userID” : 10101010102 } ] } |
{ “contactList” : [ { “userID” : 10101010101 } ], “blockedUserIDList” : [ { “userID” : 10101010102 } ] } |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 400 | CFC-100002 | Group is not exist | |
| 400 | CFC-200001 | Contact is already added | |
| 400 | CFC-200003 | parameter userID is invalid userID | |
| 400 | CFC-200004 | Blocked Group Relation | |
| 400 | CFC-200005 | Exceeded max contact member limit |
/messenger/contact/api/v1.0/contact/o1/user/delete
연락처에서 친구를 삭제.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json | |
| 6 | 연락처에서 제거할 contactList | contactList | y | Body | List | ||
| 7 | 연락처에서 제거할 userID | contactList.userID | y | Body | Long | 1010101010101 |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| - | - | - | - | - |
Sample
| Request | Response |
|---|
POST /messenger/contact/api/v1.0/contact/o1/user/delete HTTP/1.1 Host : yyy.xxxxxx.com { “contactList” : [ { “userID” : 10101010101 }, { “userID” : 10101010102 } ] } |
- |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 400 | CFC-100002 | Group is not exist | |
| 400 | CFC-200002 | parameter userid is not exist in contactlist |
GET /messenger/contact/api/v1.0/contact/o1/list
등록된 연락처 목록을 조회횐다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 동기화시간 | syncTime | long | 1480489063661 | Returns sync time which will be used at next API call. |
| 연락처 목록 | contactList | List | [ {"userID": 753912291915206657}, {"userID": 753912292411707393}, {"userID": 753912844722900993}, {"userID": 753913660166377473} ] |
Returns contact list |
| 사용자ID | contactList:userID | long | 753912291915206657 | Returns userID of contact. |
Sample
| Request | Response |
|---|
| /messenger/contact/api/v1.0/contact/o1/list | { "syncTime": 1480489063661", "contactList": [ {"userID": 753912291915206657}, {"userID": 753912292411707393}, {"userID": 753912844722900993}, {"userID": 753913660166377473} ] } |
POST /messenger/contact/api/v1.0/profile/o1/search/loginid
SingleID (Knox Portal ID)를 이용한 사용자 검색
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json | |
| 6 | 검색할 사용자 리스트 | singleIdList | y | Body | List | [ {"singleId" : "test1.kim"}, {"singleId" : "test2.lee"}, {"singleId" : "test3.park"} ] |
검색할 사용자 리스트 |
| 7 | 검색할 사용자의 Knox Portal ID | singleIdList:singleId | y | Body | String | test1.kim | 검색할 사용자의 Knox Portal ID |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 사용자조회결과 | userSearchResult | Object | Returns profile search result. | |
| 조회결과목록 | searchResultList | List | Returns users userID | |
| 사용자ID | userID | long | 753913659651002369 | Returns users userID. |
| 싱글ID | singleID | String | test1.kim | Returns users Knox Suite ID |
Sample
| Request | Response |
|---|
| POST /messenger/contact/api/v1.0/profile/o1/search/loginid HTTP/1.1
{ "singleIdList" : [ {"singleId" : "test1.kim"}, {"singleId" : "test2.lee"}, {"singleId" : "test3.park"} ] } |
{ "userSearchResult": { "searchResultList": [ { "userID": 753913659651002369, "singleID": "test1.kim" } { "userID": 753913660166377473, "singleID": "test3.park" } ], "hasMore": false } } |
GET /messenger/contact/api/v1.0/device/o1/reg
사용 기기를 등록 및 Knox Messenger 기기 인증에 사용될 x-device-id값 제공.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Content Type | Content-Type | y | Header | String | application/json | |
| 4 | Accept | Accept | y | Header | String | application/json |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 디바이스서버ID | deviceServerID | long | 22222 | 등록된 deviceID. |
| 등록된 기기의 사용자ID | userID | long | 110101010 | Returns users userID. |
Sample
| Request | Response |
|---|
| GET /messenger/contact/api/v1.0/device/o1/reg HTTP/1.1 | { “deviceServerID” : 22222, “userID” : 110101010 } |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 403 | CFC-900003 | device type is not invalid | |
| 403 | CFC-900008 | exceeded device reg limit | |
| 403 | CFC-900009 | exceeded device model length limit | |
| 403 | CFC-900010 | Device reg is not allowed |
/messenger/contact/api/v1.0/device/o1/delete
등록된 기기를 해지. 접속 중인 기기를 해지할 경우 미인증 단말로 인식.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json | |
| 6 | 등록 해지된 deviceID. | deviceServerID | y | Body | Long | 10101010101 |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| API 호출 성공 여부 | result | String | success, fail |
Sample
| Request | Response |
|---|
| { POST /messenger/contact/api/v1.0/device/o1/delete HTTP/1.1 Host : yyy.xxxxxx.com { “deviceList” : [ { “deviceServerID” : 10101010101 }, { “deviceServerID” : 10101010102 } ] }} |
- |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 400 | CFC-900006 | parameter deviceID is not registered | parameter deviceID is not registered |
/messenger/contact/api/v1.0/device/o1/use/info
본인 및 타인의 기기별 마지막 사용시간 조회.(Open API 기기 제외)
singleIdList는 최대 600개까지 입력 가능함.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device Type | x-device-type | y | Header | String | relation | |
| 3 | Device ID | x-device-id | y | Header | String | 1234 | |
| 4 | Content Type | Content-Type | y | Header | String | application/json | |
| 5 | Accept | Accept | y | Header | String | application/json | |
| 6 | 조회할 사용자 리스트. | singleIdList | y | Body | List | [] | |
| 7 | 조회할 사용자의 Knox Suite ID | singleIdList.singleId | y | Body | String | [] |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| API 호출 성공 여부 | result | String | success, fail | |
| 사용자별 검색 결과 | userDeviceList | String | [ ] | |
| 사용자의 userID | userID | Long | 10101010101 | |
| 사용자의 Knox Suite ID | singleID | String | test1.kim | |
| 사용자의 deviceList | deviceList | List | [ ] | |
| 사용자의 deviceID | deviceServerID | Long | 20490 | |
| 마지막 접속시간 | conn_date | String | 2016-06-22 PM 04:22:46 | |
| OS Type | deviceOsType | String | Windows, Android,iOS | |
| Device Type | deviceType | String | pc, mobile |
Sample
| Request | Response |
|---|
| { POST /messenger/contact/api/v1.0/device/o1/use/info HTTP/1.1 { "singleIdList" : [ {"singleId" : "test1.kim"}, {"singleId" : "test2.lee"}, {"singleId" : "test3.park"} ] } Host : yyy.xxxxxx.com}} |
{ { "userDeviceList": [ { "userID": 761258979308365297, "singleID": "test1.kim", "deviceList": [ { "deviceServerID": 1000003610, "conn_date": "2016-06-22 PM 04:22:46", "deviceType": "pc", “deviceOsType”: “Windows” } ] }, { "userID": 755053073097855041, "singleID": "test2.lee", "deviceList": [ { "deviceServerID": 20490, "deviceType": "mobile", “deviceOsType”: “Android” }, { "deviceServerID": 1000006058, "deviceType": "mobile" “deviceOsType”: “iOS” } ] }, { "userID": 755053029387931649, "singleID": "test3.park", "deviceList": [] } ] } } |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
GET /messenger/file/api/v1.0/file/v1/getCurrentTime
Secure API 호출 시 사용되는 x-request-time에 대입할 서버 측 현재 시간(UTC) 및 암호화 키를 반환한다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Accept | Accept | Header | String | application/json | application/json | |
| 2 | Access token | Authorization | y | Header | String | Bearer ce1d72e2a6c96cc09db7c837b1e44fc1 | [평문] Access Token. |
| 3 | Access token | x-access-token | y | Header | String | ce1d72e2a6c96cc09db7c837b1e44fc1 | [평문] Access Token - Authorization과 동일한 값이나 Bearer는 제외 |
| 4 | Device ID | x-device-id | y | Header | String | 131314850 | [평문] Device registration API를 통해 얻은 deviceServerID를 사용 |
| 5 | Device Type | x-device-type | y | Header | String | relation | [평문] Device type을 사용. - Valid Values: [relation] |
| 6 | 키문자열(파일명) | word | y | Path | String | r1234562312121.gif | [평문] 파일명을 이용해서 암호화 키 문자열로 사용 - Upload : [file name] Download : [fileid] |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 서버시간 | serverTime | String | 1487298788653 | 서버측 현재 시간(UTC) |
| 암호키값 | word | String | !2#4%6&8(0gif.gif1@3$5^7*9)!2#4% | 암호키값 |
Sample
| Request | Response |
|---|
| GET /messenger/file/api/v1.0/file/v1/getCurrentTime HTTP/1.1 Host : File Server Authorization: Bearer f5fe27195fb2523cee1758c162a9f60 x-access-token: f5fe27195fb2523cee1758c162a9f60 x-device-id: 131314850 x-device-type: relation [Upload] GET /messenger/file/api/v1.0/file/v1/getCurrentTime?word=r1234562312121.gif HTTP/1.1 Host : File Server Authorization: Bearer f5fe27195fb2523cee1758c162a9f60 x-access-token: f5fe27195fb2523cee1758c162a9f60 x-device-id: 131314850 x-device-type: relation [Download] GET /messenger/file/api/v1.0/file/v1/getCurrentTime?word=70wT1NHM0y0TF HTTP/1.1 Host : File Server Authorization: Bearer f5fe27195fb2523cee1758c162a9f60 x-access-token: f5fe27195fb2523cee1758c162a9f60 x-device-id: 131314850 x-device-type: relation | [success] HTTP/1.1 200 OK Content-Type: application/json Server: File Server { "serverTime": "1487298788653", "word": "!2#4%6&8(0gif.gif1@3$5^7*9)!2#4%" } [error] HTTP/1.1 400 Bad Request Content-Type: application/json Content-Length: 97 Server: File Server Connection: close { "svrTime": "2016-02-11 12:34:03.997", "errorCode": "CFI-10001", "errorMessage": " x-device-id is mandatory" } |
Error Code
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 200 | Success | ||
| 204 | No Content | ||
| 301 | Moved Permanently | ||
| 302 | Found | ||
| 307 | Temporary redirect | ||
| 400 | CFI-10001 | {argument} is mandatory | |
| 400 | CFI-10002 | {argument} is invalid | |
| 400 | BLUE-999999 | Device is not registered | |
| 400 | BLUE-444401 | Email address is not verified | |
| 401 | Unauthorized | ||
| 403 | Forbidden | ||
| 500 | Internal Server Error |
PUT /messenger/file/api/v1.0/file/v1s/file/{filename}
파일 서버에 파일이 업로드 되고 해당 파일을 다운로드 받을 수 있는 URL을 반환한다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Accept | Accept | Header | String | application/json | 응답에 허용되는 특정 미디어 유형을 지정. - Default: application/json - Valid Values: [application/json, application/xml] | |
| 2 | Content-Type | Content-Type | Header | String | binary/octet-stream | Content-Type - Default: binary/octet-stream - Valid Values: MIME types | |
| 3 | Content-Length | Content-Length | y | Header | String | 32121 | 업로드 할 파일의 크기 (bytes) Valid Values: decimal number |
| 4 | Access token | Authorization | y | Header | String | Bearer ce1d72e2a6c96cc09db7c837b1e44fc1 | [평문] Access Token |
| 5 | Access token | x-access-token | y | Header | String | BublCtBL1kiiUfArCc1ECFChhKGKrdc5liIrsFEuc1kh2pgPShAar9x81edAn1zd | [암호화] Access Token을 aes256으로 암호화 해야함 - Token type (“Bearer”)를 제외한 Token Value만 Encrypt 처리 |
| 6 | Device ID | x-device-id | y | Header | String | wsXERf15w7AZy9m0xJVg+g== | [암호화] Device registration API를 통해 얻은 deviceServerID를 AES256으로 암호화해서 사용 |
| 7 | Device Type | x-device-type | y | Header | String | 9JtF6T25SvaSnkgmbkIZsA== | [암호화] Device type을 AES256으로 암호화해서 사용. - Valid Values: [relation] |
| 8 | Server Time | x-request-time | y | Header | String | JVdr5iiTe6ogMBoGnwkhOg== | [암호화] File Server Time(key) API를 통해 얻은 serverTime을 AES256으로 암호화해서 사용 |
| 9 | File Name | filename | y | Header | String | r1500944966271.jpg | [평문] 업로드 시 파일이름은 반드시 다음의 Rule을 준수해서 지정. - Rule : “r” + TimeStamp + Extension |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 다운로드 경로 | download_url | String | https://yyy.xxxxxx.com/file/v1s/file/70wT1NHM0y0TF | 파일 다운로드 경로 |
Sample
| Request | Response |
|---|
| PUT /messenger/file/api/v1.0/file/v1s/file/ r1500944966271.jpg HTTP/1.1 Host : File Server Content-Length: 11434 Authorization: Bearer f5fe27195fb2523cee1758c162a9f60 x-access-token: BublCtBL1kiiUfArCc1ECFChhKGKrdc5liIrsFEuc1kh2pgPShAar9x81edAn1zd x-device-id: wsXERf15w7AZy9m0xJVg+g== x-device-type: 9JtF6T25SvaSnkgmbkIZsA== x-request-time: JVdr5iiTe6ogMBoGnwkhOg== [11434 bytes of object data] | [success] HTTP/1.1 200 OK Content-Type: application/json Server: File Server { "download_url": "https://yyy.xxxxxx.com/file/v1s/file/70wT1NHM0y0TF" } [error] HTTP/1.1 400 Bad Request Content-Type: application/json Content-Length: 98 Server: File Server Connection: close { "svrTime": "2015-02-11 12:32:30.234", "errorCode": "CFI-10002", "errorMessage": "filename is invalid" } |
Error Code
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 200 | Success | ||
| 204 | No Content | ||
| 301 | Moved Permanently | ||
| 302 | Found | ||
| 307 | Temporary redirect | ||
| 400 | CFI-10001 | {argument} is mandatory | |
| 400 | CFI-10002 | {argument} is invalid | |
| 400 | CFI-10003 | File size is overflow | |
| 400 | CFI-10004 | File size is empty | |
| 400 | CFI-10005 | File format is error | |
| 400 | CFI-10006 | File format is not supported | |
| 400 | CFI-10011 | Infected File | |
| 400 | CFI-10013 | No permission to upload a file | |
| 400 | BLUE-999999 | Device is not registered | |
| 400 | BLUE-444401 | Email address is not verified | |
| 401 | Unauthorized | ||
| 403 | Forbidden | ||
| 500 | Internal Server Error |
GET /messenger/file/api/v1.0/file/v1s/file/{file_id}
파일 서버에서 파일을 다운로드 한다. 만약 파일을 다운로드 하려면, 당신의 application은 반드시 302 code responses를 취급해야 한다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer ce1d72e2a6c96cc09db7c837b1e44fc1 | [평문] Access Token |
| 2 | Access token | x-access-token | y | Header | String | BublCtBL1kiiUfArCc1ECFChhKGKrdc5liIrsFEuc1kh2pgPShAar9x81edAn1zd | [암호화] Access Token을 aes256으로 암호화 해야함 - Token type (“Bearer”)를 제외한 Token Value만 Encrypt 처리 |
| 3 | Device ID | x-device-id | y | Header | String | wsXERf15w7AZy9m0xJVg+g== | [암호화] 기기 등록을 통해 얻은 deviceServerID를 aes256으로 암호화 해야함. |
| 4 | Device Type | x-device-type | y | Header | String | 9JtF6T25SvaSnkgmbkIZsA== | [암호화] 기기 타입을 aes256으로 암호화 해야함. - Valid Values: [relation] |
| 5 | Server Time | x-request-time | y | Header | String | JVdr5iiTe6ogMBoGnwkhOg== | [암호화] 파일 서버에서 받은 서버시간을 AES256 Encrypt 처리하여 지정 |
| 6 | 파일ID | file_id | y | Path | String | 70wT1NHM0y0TF | [암호화] Secure Upload File API를 통해 얻은 download_url의 맨 뒤 file ID값을 AES256으로 암호화해서 사용 |
| 7 | 썸네일 크기 | thumb | Parameter | String | 160x160 | 다운로드 할 썸네일의 사이즈 지정. - Valid Values: [160x160] |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| (데이터) | (payload) | Binary | 파일 바이너리 데이터 |
Sample
| Request | Response |
|---|
| GET /messenger/file/api/v1.0/file/v1s/file/70wT1NHM0y0TF?thumb=160x160 HTTP/1.1 Host : File Server Authorization: Bearer f5fe27195fb2523cee1758c162a9f60 x-access-token: BublCtBL1kiiUfArCc1ECFChhKGKrdc5liIrsFEuc1kh2pgPShAar9x81edAn1zd x-device-id: wsXERf15w7AZy9m0xJVg+g== x-device-type: 9JtF6T25SvaSnkgmbkIZsA== x-request-time: JVdr5iiTe6ogMBoGnwkhOg== | [success] HTTP/1.1 200 OK Content-Length: 434234 Content-Type: image/jpeg Connection: close Server: File Server [434234 bytes of object data] [error] HTTP/1.1 400 Bad Request Content-Type: application/json Content-Length: 97 Server: File Server Connection: close {"svrTime": "2015-02-11 12:34:03.997","errorCode": "CFI-10002", "errorMessage": "file_id is invalid"} |
Error Code
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 200 | Success | ||
| 204 | No Content | ||
| 301 | Moved Permanently | ||
| 302 | Found | ||
| 307 | Temporary redirect | ||
| 400 | CFI-10001 | {argument} is mandatory | |
| 400 | CFI-10002 | {argument} is invalid | |
| 400 | CFI-10007 | File has expired | |
| 400 | CFI-10012 | V7 Empsearch API error | |
| 400 | BLUE-999999 | Device is not registered | |
| 400 | BLUE-444401 | Email address is not verified | |
| 401 | Unauthorized | ||
| 403 | Forbidden | ||
| 500 | Internal Server Error |
/messenger/msgctx/api/v1.0/key/getkeys
Device의 channel auth Key and device key를 조회한다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device ID | x-device-id | y | Header | Long | 1234 | |
| 3 | Content Type | Content-Type | n | Header | String | application/json | |
| 4 | Accept | Accept | n | Header | String | application/json | |
| 5 | Device Type | x-device-type | n | Header | String | mobile | mobile or pc or relation |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| Device의 Message key | key | String | 4cc5d9fa5d44819357618b8a8d8c21326df20fa95cd5fd6da0f9cdd030d1a9b7c31df7eb7080b9c3b62ee0348eb1d86b | |
| Device의 Expired message key | expiredkey | String | 4cc5d9fa5d44819357618b8a8d8c21326df20fa95cd5fd6da0f9cdd030d1a9b7c31df7eb7080b9c3b62ee0348eb1d86b | optional |
| Channel Auth key | channelauthkey | String | 537461636b5472616365456c656d656e745b5d20656c656d73203d2065782e67696e742066696e616c4c656e203d2070 | |
| Message key의 expiring Timestamp 값 | keyexpirationtimestamp | Long | 1718094662042 |
Sample
| Request | Response |
|---|
| GET /messenger/msgctx/api/v1.0/key/getkeys HTTP/1.1 Host : yyy.xxxxxx.com Content-type: application/json Accept: application/json x-device-type : mobile x-device-id : 1234 Authorization : Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 |
HTTP/1.1 200 OK { “key” : “4cc5d9fa5d44819357618b8a8d8c21326df20fa95cd5fd6da0f9cdd030d1a9b7c31df7eb7080b9c3b62ee0348eb1d86b”, “channelauthkey” : “537461636b5472616365456c656d656e745b5d20656c656d73203d2065782e67696e742066696e616c4c656e203d2070” } |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 400 | BLUE-999999 | Not exist deviceId | |
| 400 | BMC-300150 | Not Exist Channel Auth Key. |
/messenger/msgctx/api/v1.0/chat/activemember
채팅방의 참여자 수와 User ID를 조회한다.
Request Parameter
| No. | Properties | Attribute | Mandatory | Parameter Type | Data Type | Sample Data | Note |
|---|
| 1 | Access token | Authorization | y | Header | String | Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 | |
| 2 | Device ID | x-device-id | y | Header | Long | 1234 | |
| 3 | Content Type | Content-Type | n | Header | String | application/json | |
| 4 | Accept | Accept | n | Header | String | application/json | |
| 5 | Device Type | x-device-type | n | Header | String | mobile | mobile or pc or relation |
| 6 | Chatroom Id | chatroomid | y | Query | Long | 332321144605 | max 19 number string |
Response Parameter
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 현재 대화방에 참여중인 멤버의 수 | activemembercount | Integer | 10 | |
| 현재 대화방에 참여중인 멤버의 User ID List. | activememberlist | Long | List |
Sample
| Request | Response |
|---|
| GET
/messenger/msgctx/api/v1.0/chat/activemember?chatroomid=1221232323 HTTP/1.1 Host : yyy.xxxxxx.com Content-type: application/json Accept: application/json x-device-type : mobile x-device-id : 1234 Authorization : Bearer fc55e83b7dea72ebe8f4f0dee2a2c4 |
HTTP/1.1 200 OK { “activemembercount”:5, “activememberlist” : [ 753913371694206977, 753915435136061441, 753915446684553217, 753916848394735617, 753916967328419841 ] } |
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 400 | BLUE-999999 | Not exist deviceId |
아래 목록의 API들은 메시지군의 API들로써 공통적인 포맷을
갖는다. (payload data 암호화, 공통 error 코드)
- 대화방 생성
- 메시지 발신
- 대화상대 초대
- 대화상대 내보내기
- 대화방
삭제
- 메시지 발신취소
- 대화방명 변경
- 방장 변경
- 대화방 나가기
- 메시지 읽음 Count 조회
payload data 암호화
API호출에 사용되는 Request Payload data와
Response Payload data는 암호된 값을 사용한다.
각 API 기능별로 Payload 내에 적재된 RequestBody와 ResponseBody내용을 전송단에서
Aes256암호화 > Base64암호화를 거쳐 데이터를 보내며, 수신단에서 Base64복호화 > Aes256복호화를 거쳐 암호화를 해제함으로써 데이터 추출할 수
있다.
기능별 API 명세에서는 각 API별로, 암호화가 해제된 평문 기준의 RequestBody, ResponseBody 명세에 대한 설명이 기재되어 있다.
연계 시스템측에서 사용하게 되는 RequestBody 암호화 및 ResponseBody 복호화에 대한 예시는 아래와 같다.
| [RequestBody 암호화 예시] | [ResponseBody 복호화 예시] |
|---|
| 적용전 (RequestBody평문): {"requestId": 1578016699286727, "chatroomId":
99343295704997888} 암호화 1단계: AES256 인코딩 암호화 2단계: BASE64 인코딩 적용후 (RequestBody암호문): IN/WslquK+4b3I+I3lJF1UyiYksAhZRncHL5axCGpJur9U/LabuKIIo7OKEQe1JOSaCb3szhWphL2Ufhj86dcClTXz5b+AVYDq6LRbd4zBQ= |
적용전 (ResponseBody-암호문):
7Q9FCL95U+5FIFGcZbG9Y6wvpod95dfH+pxDZVb3HnJzz/U+nZAG3tQ+NPOUprKaMZ3rTEPbYsMr89KIWEdpog==
복호화 1단계: AES256 디코딩 복호화 2단계: AES256 디코딩 적용후 (ResponseBody-평문): { "code": 3003, "msg": "All receivers are invalid." } |
※ 예시에 사용된 메시지 키 값은 아래와 같으며, 실사용시 메시지
키값을 "메시지서버 암호화 Key 조회" api로 조회하여 사용하여야 한다.(메시지 key값은 단말별로 부여됨)
- 예시에 사용된 메시지 key:
"b6d06ce799b97b58aa606e393c6a18ee1f6008726b59072036207ccafe6443b9b3c546f665fdae562a7d8d35f4bca16e"
※ 암복호화 모듈 구현은 샘플 코드를 참고 바람.
메시지 공통 Error Code
| HTTP응답코드 | 에러코드 | 에러메시지 | 조치방안 |
|---|
| 200 | 1000 | Success | |
| 200 | 1001 | Detected some invalid receivers. (Success partial) | |
| 204 | No Content | ||
| 400 | 2001 | Wrong token | |
| 400 | 2002 | Not registered requester. | |
| 400 | 3003 | Invalid receiver. | |
| 400 | 3004 | Receiver is not enabled. | |
| 400 | 3005 | Exceeded chatroom count limit. | |
| 400 | 3009 | Membership violation detected. | |
| 400 | 3106 | All receivers are invalid. | |
| 400 | 4001 | Wrong parameter value. | |
| 400 | 4003 | Wrong body! (Fail decrypt about message body.) 해당 에러 발생 시 6.1 GET Keys API를 수행하여 최신 Key value를 response 받아서 RequestBody 암호화를 수행할 것을 권장함. |
|
| 400 | 6001 | General DAO error | |
| 400 | 7001 | Not bounded device. | |
| 400 | 9000 | Internal server error. | |
| 400 | 9001 | Exceeded session count limit. | |
| 400 | 9002 | Short Term DDoS detected. | |
| 400 | 9003 | Long Term DDoS detected. (정책 시간 동안 api 사용 금지 ex. 12시간) |
|
| 401 | Unauthorized | ||
| 403 | Forbidden | ||
| 500 | Internal Server Error |
POST /messenger/message/api/v1.0/message/createChatroomRequest
신규 대화방을 생성한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방유형 | BODY:chatType | y | Integer | 2 | Chat Type, 대화방 유형 “단방향(공지type)” 외부연계 사용 시 2,5만 사용 0: (SINGLE) – 1:1 대화 1: (GROUP) – Group 대화 2: (BROADCAST GROUP) Group 공지방(2인이상) 5: (BROADCAST SINGLE) 1:1 공지방 |
|
| (3) | 참여자목록 | BODY:receivers | y | List |
[753917009235808257,753916848517419009] | 채팅 참여자들의 User Id를 리스트 형태로 작성 | |
| (4) | 대화방이름 | BODY:chatroomTitle | String | "dev server team" | 최대 길이 128 자 (utf8mb4) |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | "Detected some invalid receivers." | 결과 내용 |
| 결과:참여불가상세 | result:wrongReceiverDetail | |||
| 결과:참여불가상세:잘못된 사용자 목록 | result: wrongReceiverDetail: invalidReceivers | List |
[897548937598437953, 89754354568789456] | 잘못된 유저정보로 대화방에 입장할 수 없는 사용자 * 결과 코드 1001/3003 리턴 |
| 결과:참여불가상세:정책상 불허된 목록 | result: wrongReceiverDetail: organizationViolated | List |
[897548937598437953, 89754354568789456] | 정책상 대화할 수 없는 사용자 (회사가 다르면 대화가 불가함) * 결과 코드 1001/3003 리턴 |
| 결과:참여불가상세:단말 미등록자 목록 | result: wrongReceiverDetail: disabledReceivers | List |
[897548937598437953, 89754354568789456] | 등록된 단말이 없어서 대화에 참여할 수 없는 사용자 * 결과 코드 1001/3003 리턴 |
| 결과:참여불가상세:자통법상 차단된 목록 | result: wrongReceiverDetail: blockedGroup | List |
[897548937598437953, 89754354568789456] | 자본시장통합법에 의거 대화를 할 수 없는 관계의 사용자 * 결과 코드 1001/3003 리턴 |
| 대화방 생성시간 | createTimeMillis | Long | 1578386757248 | 대화방 생성시간 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/createChatroomRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"chatType": 2, "requestId": 1578016699286727, "receivers":[753917009235808257,753916848517419009]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId": 1578016699286727, "chatroomId": 99343295704997888, "result": {"code": 1000, "wrongReceiverDetail": {}}, createTimeMillis": 1578016699269} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/chatRequest
메시지를 발송한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY: requestId | y | Long | # {"requestId": 15784605065976949, "chatroomId": 99343295704997888, "chatMessageParams": [{"msgId": 15784605065976949, "msgType": 0, "chatMsg": "blah~ blah~", "msgTtl": 7200}]} | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY: chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | BODY: chatMessageParams | y | List |
최대 10개 | |||
| (3-1) | BODY: chatMessageParam: msgId | y | Long | 1578409921352 | 메시지별 Unique한 ID, Milliseconds 형식 (ex. 1302575819285 ) | ||
| (3-2) | BODY: chatMessageParam: msgType | y | Integer | 0 | Msg Type, 메시지 유형 0: (TEXT) ? Common text message 1: (MEDIA) ? MultiMedia message (file, video) 7: (RTF) - Excel message 8: (NCUSTOM) - Message with json format |
||
| (3-3) | BODY: chatMessageParam: chatMsg | y | String | "Hello world!" | 메시지 내용 (최대 3,300자) | ||
| (3-4) | BODY: chatMessageParam: msgTtl | Integer | 7200 | 메시지 서버 저장 기간 (Min : 3600 sec / Max : according to company policy /
Default : 259200 sec) * If an unacceptable value is entered, the default value |
# {"requestId": 15784605065976949, "chatroomId": 99343295704997888, "chatMessageParams": [{"msgId": 15784605065976949, "msgType": 0, "chatMsg": "blah~ blah~", "msgTtl": 7200}]}
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | Result * If Nth message in 10 is failed, It is cause of failure for the message. |
||
| 결과: 코드 | result: code | Integer | 1000 | Result code |
| 결과: (에러)내용 | result: msg | String | Result message | |
| 결과: 메시지처리상세 | result: processedMessageEntries | List |
||
| 결과: 메시지처리상세: 메시지ID | result: processedMessageEntrie: msgId | Long | 전달된 메시지 ID | |
| 결과: 메시지처리상세: 전달시간 | result: processedMessageEntrie: sentTime | Long | 1578449866003 | 전달시간 (서버 기준) * If it is failed to sending message, returns 0 |
| 결과: 참여불가상세 | result: wrongReceiverDetail | |||
| 결과: 참여불가상세: 잘못된 사용자 목록 | result: wrongReceiverDetail: invalidReceivers | List |
[897548937598437953, 89754354568789456] | 잘못된 유저 정보로 메시지를 전달할 수 없는 사용자 * It is available for ResultCode 1001/3003 |
| 결과: 참여불가상세: 단말 미등록자 목록 | result: wrongReceiverDetail: disabledReceivers | List |
[897548937598437953, 89754354568789456] | 등록된 단말이 없어서 메시지를 전달할 수 없는 사용자 * It is available for ResultCode 1001/1003 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/chatRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784605065976949, "chatroomId": 99343295704997888, "chatMessageParams": [{"msgId": 15784605065976949, "msgType": 0, "chatMsg": "blah~ blah~", "msgTtl": 7200}]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId":15784605065976949,"chatroomId":99343295704997888,"result":{"code":1000,"wrongReceiverDetail":{}},"processedMessageEntries":[{"msgId":15784605065976949,"sentTime":1578460506612}]} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/inviteRequest
대화 상대를 초대한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY: requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY: chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 초대자목록 | BODY: invitingMembers | y | List |
[773887412433063937, 74124330639377655] | 초대 대상자 User Id |
# {"requestId": 15784506666772442, "chatroomId": 99343295704997888, "invitingMembers": [773887412433063937]}
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 초대받은시간 | sentTime | Long | 1578450666592 | 서버로부터 초대받은 시간 |
| 결과 | result | Result * If Nth message in 10 is failed, It is cause of failure for the message. |
||
| 결과: 코드 | result: code | Integer | 1000 | Result code |
| 결과: (에러)내용 | result: msg | String | Result message | |
| 결과: 참여불가상세 | result: wrongReceiverDetail | |||
| 결과: 참여불가상세: 잘못된 사용자 목록 | result: wrongReceiverDetail: invalidReceivers | List |
[897548937598437953, 89754354568789456] | 잘못된 유저 정보로 메시지를 전달할 수 없는 사용자 * It is available for ResultCode 1001/3003 |
| 결과: 참여불가상세: 정책상 불허된 목록 | result: wrongReceiverDetail: organizationViolated | List |
[897548937598437953, 89754354568789456] | 정책상 대화할 수 없는 사용자 (회사가 다르면 대화가 불가함) * It is available for ResultCode 1001/3003 |
| 결과: 참여불가상세: 단말 미등록자 목록 | result: wrongReceiverDetail: disabledReceivers | List |
[897548937598437953, 89754354568789456] | 등록된 단말이 없어서 메시지를 전달할 수 없는 사용자 * It is available for ResultCode 1001/1003 |
| 결과: 참여불가상세: 이미 참여한 목록 | result: wrongReceiverDetail: existing | List |
[897548937598437953, 89754354568789456] | 이미 대화방에 참여중인 사용자 * It is available for ResultCode 1001/3003 |
| 결과: 참여불가상세: 인원제한으로 누락된 목록 | result: wrongReceiverDetail: interruptedReceivers | List |
[897548937598437953, 89754354568789456] | 대화방의 멤버가 최대 인원을 넘어서 초대할 수 없는 사용자 * It is available for ResultCode 1001/3003 |
| 결과: 참여불가상세: 자통법상 차단된 목록 | result: wrongReceiverDetail: blockedGroup | List |
[897548937598437953, 89754354568789456] | 자본시장통합법에 의거 대화를 할 수 없는 관계의 사용자 * It is available for ResultCode 1001/3003 |
# {"requestId":15784506666772442,"chatroomId":99343295704997888,"result":{"code":1000,"wrongReceiverDetail":{}},"sentTime":1578450666592}
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/inviteRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(��ȣȭ��): {"requestId": 15784506666772442, "chatroomId": 99343295704997888, "invitingMembers": [773887412433063937]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId":15784506666772442,"chatroomId":99343295704997888,"result":{"code":1000,"wrongReceiverDetail":{}},"sentTime":1578450666592} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/removeMemberRequest
대화 상대를 방출한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY:chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 방출자 목록 | BODY:removingMembers | y | List |
[753917009235808257,753916848517419009] | 방출할 대상자 User Id를 리스트 형태로 작성 |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 요청시간 | 1578450666592 | 서버로 요청받은 시간 | ||
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | 결과 내용 | |
| 결과:비정상수신자상세 | result:wrongReceiverDetail | |||
| 결과:비정상수신자상세:미참여 | result: wrongReceiverDetail:notExisting | List |
[897548937598437953, 89754354568789456] | 내보내기 대상자 중 대화방 멤버가 아닌 사용자 * 결과 코드 1001/3003 리턴 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/removeMemberRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784562811364493, "chatroomId": 99343295704997888, "removingMembers": [773887412433063937]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId":15784562811364493,"chatroomId":99343295704997888,"result":{"code":1000},"sentTime":1578456281137} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/destroyChatroomRequest
대화방을 삭제한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY:chatroomId | y | Long | 99343295704997888 | 대화방 ID |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | 결과 내용 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/destroyChatroomRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전){"requestId": 15784562811364493, "chatroomId": 99343295704997888} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message
Server {"requestId":15784562811364493,"chatroomId":99343295704997888,"result":{"code":1000}} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/recallMessageRequest
발송된 메시지를 취소한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY:chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 메시지ID | BODY:msgId | y | Long | 15784605065976949 | 발신 취소 대상 메시지 ID | |
| (4) | 원본메시지 발송시간 | BODY:sentTime | y | Long | 1578460506612 | 원본 메시지 발송시간 (메시지 발송 ChatReply 의 sentTime) | |
| (5) | 미디어정보 | BODY:mediaInfo | String | "http:// sqaproxy.samsung.net/file/v1/file/esK93SYcoqeE8ETvJgUdeg" | 발신취소 대상 메시지가 MEDIA 타입인 경우 삭제 대상 파일의 "download url" |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | 결과 내용 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/recallMessageRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "msgId": 15784605065976949, "sentTime": 1578460506612} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId":15784610001948974,"chatroomId":99343295704997888,"result":{"code":1000}} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/changeChatroomMetaRequest
대화방의 Meta 정보를 변경한다. (대화방명 변경만 가능)
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY: requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY: chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 대화방 이름 | BODY: title | String | "dev server team" | 변경하고자 하는 대화방명 |
# {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "title": "메시지 테스트방1"}
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | Result | ||
| 결과: 코드 | result: code | Integer | 1000 | Result code |
| 결과: (에러)내용 | result: msg | String | Result message | |
| 대화방 변경시간 | changeTimeMillis | Long | 1578386757248 | 대화방 속성(이름)이 변경된 시간 |
# {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "result": {"code": 1000}, changeTimeMillis": 1578016699269}
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/changeChatroomMetaRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "title": "메시지 테스트방1"} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "result": {"code": 1000}, changeTimeMillis": 1578016699269} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/changeOwnerRequest
대화방의 방장을 변경한다. (ChatType이 0: (1:1 대화방), 1: (Group 대화방)에서만 지원됨)
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY: requestId | y | Long | # {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "newOwner": 753917009235808257} | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY: chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 새방장ID | Long | 753917009235808257 | 새로운 방장ID |
# {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "newOwner": 753917009235808257}
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 생성된 대화방 Id |
| 결과 | result | Result | ||
| 결과: 코드 | result: code | Integer | 1000 | Result code |
| 결과: (에러)내용 | result: msg | String | Result message | |
| 요청시간 | sentTime | Long | 1578386757248 | 서버에서 해당 Request를 받은 시간 |
{"requestId": 15784610001948974, "chatroomId": 99343295704997888, newOwner": 753917009235808257}
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/changeOwnerRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "newOwner": 753917009235808257} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "result": {"code": 1000}, newOwner": 753917009235808257} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/endChatRequest
대화방에서 퇴장한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | BODY:endChatEntries | y | List |
||||
| (2-1) | 퇴장할 대화방 ID | BODY:endChatEntriy:chatroomId | y | Long | 99343295704997888 | 퇴장할 대화방 ID |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | 결과 내용 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/endChatRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784610001948974, "endChatEntries":[{"chatroomId": 99343295704997888}]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId": 15784610001948974, "result": {"code": 1000}} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)
POST /messenger/message/api/v1.0/message/messageReadCountRequest
발신 메시지를 읽은 사용자의 수를 조회한다.
Request Parameter
| Parameter Type | No. | Properties | Attribute | Mandatory | Data Type | Sample Data | Note |
|---|
| Header | 1 | 응답 허용 타입 | Accept | String | "application/json" | Default: application/json Valid Values: [application/json, application/xml] |
|
| 2 | 첨부데이터타입 | Content-Type | y | String | "application/json" | Payload의 content type 명시 ex) application/json |
|
| 3 | 인증토큰 | Authorization | y | String | "Bearer f5fe27195fb2523cee1758c162a9f60" | [평문] Access Token (발급 받은 Access Token) | |
| 4 | 단말ID | x-device-id | y | String | "104032854" | [평문] 연계시스템용으로 등록한 단말 ID ("메신저 Device 등록" 부분 참조) | |
| 5 | 단말종류 | x-device-type | y | String | "relation" | [평문] 단말 타입, “relation” 으로 고정 ※ relation: 외부연계 시스템 |
|
| Payload | Body | y | String | "/6Fz+KIhVzmyhiBpMrLNJp+0saSg7b7XlZp3tlXrnRLVaCHDD4XqV9dGVh6hmri7hR3dJdTps1qO3gDH1XccTj3Qmy3X4MsMBFP8AW3uIGk7QdlBp0wMi8FBrHExUR/h" | [암호화] Payload 데이터 ※ 평문 상태(json문자열)의 BODY항목을 2단계 암호화를 거친 암호화된 문자열 값. 1단계: Aes256암호화 (암호화키는 "메시지서버 암호화 Key 조회" 부분 참조) 2단계: Base64암호화 |
||
| (1) | 요청ID | BODY:requestId | y | Long | 1302575819285 | Packet별로 Unique한 Id Milliseconds 형식 (ex. 1302575819285 ) | |
| (2) | 대화방ID | BODY:chatroomId | y | Long | 99343295704997888 | 대화방 ID | |
| (3) | 메시지정보 | BODY:messageEntry | y | List |
|||
| (3-1) | 메시지ID | BODY:messageEntry: msgId | y | Long | 38635452485935 | 카운트 조회를 하고자 하는 메시지의 ID | |
| (3-2) | 원본메시지 발송시간 | BODY:endChatEntriy:messageEntry: sentTime | Long | 1472639462088 | 카운트 조회를 하고자 하는 메시지의 sent time |
Response Parameter [Encrypted]
| Properties | Attribute | Data Type | Sample Data | Note |
|---|
| 요청ID | requestId | Long | 15783867572942564 | Packet별로 Unique한 Id (Milliseconds 형식) ※ 요청시 사용한 requestId 값과 동일 |
| 대화방ID | chatroomId | Long | 99536308621824000 | 대화방 Id |
| 결과 | result | 결과 | ||
| 결과:코드 | result:code | Integer | 1000 | 결과 코드 |
| 결과:(에러)내용 | result:msg | String | 결과 내용 | |
| 결과:카운트 조회 목록 | result:messageEntry | List |
||
| 결과:카운트 조회 목록:메시지ID | result:messageEntry:msgId | Long | 카운트 조회한 메시지의 ID | |
| 결과:카운트 조회 목록:메시지발송시간 | result:messageEntry:sentTime | Long | 카운트 조회한 메시지의 sent time | |
| 결과:카운트 조회 목록:읽음 카운트 | result:messageEntry:readCount | Integer | 해당 메시지에 대한 읽음 카운트 |
Sample
| Request | Response |
|---|
| POST /messenger/message/api/v1.0/message/messageReadCountRequest
HTTP/1.1 headers: {"Accept": "application/json", "Authorization": "Bearer ed114dc382ca16d5b43154fe5832a7", "Content-Type": "application/json", "x-device-id": "1000145874", "Content-Length": "172"} body(암호화전): {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "messageEntry":[{"msgId": 38635452485935, "sentTime":1472639462088}]} |
HTTP/1.1 200 OK Content-Type: application/json Server: Message Server {"requestId": 15784610001948974, "chatroomId": 99343295704997888, "result": {"code": 1000}, "messageEntry":[{"msgId": 38635452485935, "sentTime":1472639462088, "readCount":0}]} |
Error Code
"메시지 API 공통 포맷" 부분 참조 (에러코드 부분)