mPowerChat Attachment
mPowerChat Attachment is a messaging API which accommodates file/image attachments along with the messages. The API accepts the message template and attachment as inputs. Refer Get Attachment to download the attachment.
Resource Informations
| Name | Value |
|---|---|
| Requires authentication? | Yes |
| Rate limited? | No |
Request
Request headers
| Key | Value |
|---|---|
| Authorization | Bearer token |
| Content-Type | application/json |
HTTP request URL for SSMS
POST https://{tenantId}.{hostname}/digitanium/v3/mpower/users/{userName}/chat/attachment
HTTP request URL for SHIFT
POST https://{hostname}/auth/realms/{tenantId}/mpower/v1/users/{userName}/mediaChat
note
API requests must be made over https. Calls made over plain http will fail.
Parameters
No Parameter fields are required.
Request body
| Field Name | Type | Description |
|---|---|---|
| message | String | Add the message template. |
| attachment | attachment | Attach the file to be sent along with the message. |
| instanceId | String | Some string value.If not provided by default a Random ID will be assigned. |
Sample Request
{
"serviceUuid": "{service-uuid}",
"messageType": "attachmentMessage",
"version": 3,
"messageContent": {
"messageText": "attachment"
}
}
Response
| Field Name | Type | Description |
|---|---|---|
| messageId | String | Unique ID for the message. |
| instanceId | String | InstanceID of the request. |
Sample Response
{
"messageId": "9vdKGlQOVU9gpNbGtC",
"instanceId": "instance-7a7d1208-9ef5-42c1-97a3-99fe309ba583"
}
Response Status Information
| Status | Type | Description |
|---|---|---|
| 200 | OK | success |
| 400 | status | Bad request |
| 401 | status | Unauthorized |