Message
Section titled “Message”Send Message
Section titled “Send Message”POST https://eko-h1.dev.ekoapp.com/bot/v1/direct/message
send message from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| uid | string | targeted userId |
| message | object | message’s object |
| message.type | string | text |
| message.data | string | message that you want to send |
{ "status": "success", "message": { "id": "5de48f26707e9f529a9c03ff", "type": "text", "groupId": "5de48f02707e9f529a9c03f8", "threadId": "5de48f02707e9f529a9c03f9" }}// example{ uid: <userID> message: { type: "text", data: <any text> }}POST https://eko-h1.dev.ekoapp.com/bot/v1/direct/picture
send picture from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| uid | string | targeted userId |
| file | string | picture |
| caption | string | picture’s caption |
{ "status": "success", "message": { "id": "5de48ecd707e9f529a9c03f4", "type": "picture", "groupId": "5dd37cc68c69855b878f2f7c", "threadId": "5dd37cc68c69855b878f2f7d" }}Send File
Section titled “Send File”POST https://eko-h1.dev.ekoapp.com/bot/v1/direct/file
send picture from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| uid | string | targeted userId |
| file | string | file |
{ "status": "success", "message": { "id": "5de48ef0707e9f529a9c03f7", "type": "file", "groupId": "5dd37cc68c69855b878f2f7c", "threadId": "5dd37cc68c69855b878f2f7d" }}Send Message To Group
Section titled “Send Message To Group”POST https://eko-h1.dev.ekoapp.com/bot/v1/group/message
send message from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| gid | string | targeted group |
| tid | string | If you leave it empty, the message will send to main chat |
| message | object | message’s object |
| message.type | string | text |
| message.data | string | message that you want to send |
{ "status": "success", "message": { "id": "5de48f26707e9f529a9c03ff", "type": "text", "groupId": "5de48f02707e9f529a9c03f8", "threadId": "5de48f02707e9f529a9c03f9" }}Send Picture To Group
Section titled “Send Picture To Group”POST https://eko-h1.dev.ekoapp.com/bot/v1/group/picture
send picture from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| gid | string | targeted group |
| tid | string | If you leave this one empty, bot will send the picture |
| file | string | picture |
| caption | string | picture’s caption |
{ "status": "success", "message": { "id": "5de48f26707e9f529a9c03ff", "type": "picture", "groupId": "5de48f02707e9f529a9c03f8", "threadId": "5de48f02707e9f529a9c03f9" }}Send File To group
Section titled “Send File To group”POST https://eko-h1.dev.ekoapp.com/bot/v1/group/file
send picture from bot to user’s direct chat
Headers
| Name | Type | Description |
|---|---|---|
| Authentication | string | token from OAuth2 |
Request Body
| Name | Type | Description |
|---|---|---|
| gid | string | targeted groupId |
| file | string | file |
{ "status": "success", "message": { "id": "5de48f26707e9f529a9c03ff", "type": "file", "groupId": "5de48f02707e9f529a9c03f8", "threadId": "5de48f02707e9f529a9c03f9" }}Was this page helpful?
Thank you for your feedback!