Send a file to a Group
POST file via groupId
Send a file to a particular Group
by groupId
Parameter
Accessible via URL https://api.channel.io/open/v4/groups/{groupId}/messages/file
and HTTP POST
Present botName parameter in query string, userChatId parameter in URL Path, other parameters in the form.
Parameter | Example | Required | Description | Parameter type |
---|---|---|---|---|
botName | channelBot | Required | Name of the bot sending the message | Query |
groupId | 12345 | Required | ID of Group | Path |
name | nameOfFile.pdf | Optional | Name of the file | FormData |
file | Optional | a file to be sent | FormData | |
requestId | ae44ac11-a56d-4488-9f29-09050a36ad02 | Optional | RequestId | FormData |
POST file via groupName
Send a file to a particular Group
by groupId
Parameter
Accessible via URL https://api.channel.io/open/v4/groups/{groupId}/messages/file
and HTTP POST
Request Body Example
Example
POST https://api.channel.io/open/group/1234/messages/file
Your POST body should look like below
{
"message": "Your message",
"botOption": {
"actAsManager": false,
"silentToManager": false
}
}
Response
Return a newly created message object
{
"message": {
"channelId": "string",
"id": "string",
"chatType": "string",
"chatId": "string",
"personType": "string",
"personId": "string",
"message": "string",
"scope": "string",
"format": "string",
"language": "string",
"file": {
"id": "string",
"name": "string",
"filename": "string",
"size": 0,
"type": "string",
"imageMeta": {
"height": 0,
"width": 0,
"orientation": 0,
"animation": true
},
"extension": "string",
"previewThumb": {
"url": "string",
"height": 0,
"width": 0
},
"url": "string",
"image": true
},
"log": {
"action": "string",
"object": "string",
"objectId": "string",
"objectType": "string"
},
"webPage": {
"id": "string",
"url": "string",
"title": "string",
"description": "string",
"imageUrl": "string",
"contentLength": 0,
"contentType": "string",
"imageMeta": {
"height": 0,
"width": 0,
"orientation": 0,
"animation": true
},
"previewThumb": {
"url": "string",
"height": 0,
"width": 0
}
},
"profileBot": [
{
"id": "string",
"key": "string",
"type": "string",
"nameI18n": {
"text": "string",
"en": "string",
"ja": "string",
"ko": "string"
},
"value": {
"s": "string",
"n": "string",
"b": {
"short": 0,
"char": "string",
"int": 0,
"long": 0,
"float": 0,
"double": 0,
"direct": true,
"readOnly": true
},
"m": {},
"l": [
{}
],
"ss": [
"string"
],
"ns": [
"string"
],
"bs": [
{
"short": 0,
"char": "string",
"int": 0,
"long": 0,
"float": 0,
"double": 0,
"direct": true,
"readOnly": true
}
],
"null": true,
"bool": true
}
}
],
"notifiedBy": "string",
"requestId": "string",
"botOption": {
"actAsManager": true,
"silentToManager": true,
"silentToGuest": true,
"welcome": true
},
"option": {
"pms": true
},
"createdAt": "2018-05-24T01:06:26.177Z",
"messageV2": "string"
}
}
Updated about 1 year ago