Edit me

Commands

* Validation error text may vary depending on a source of an error

Description

This method is for forwarding messages.

If a service specify value of localID variable, it would get MessageIdAssigned update asynchroniously.

On succes empty response with http code 200 is returned.

Endpoint

https://messapi.btsdapps.net/bot/v1/updates/

Structure

Variable Obligative Type Validation Description
type true String Must be filled with “ForwardMessage” value Type of request “ForwardMessage”
localId false String LocalID length should be <= 255 Message ID generated by Bot
fromDialog true Peer For Peer type validation see type page Peer from which message is forwarded
toDialog true Peer For Peer type validation see type page Peer to send forwarded message to
messageId true String Value must be a valid Time UUID Uuid with backend ID of a message to forward

Sample request

{
  "commands": [{
      "type": "ForwardMessage",
      "fromDialog": {
      "type": "USER",
        "id": "Uuid_value"
      },
      "toDialog": {
      "type": "USER",
        "id": "Uuid_value"
      },
      "messageId": "Uuid_value"
 }]
}

Updates

This method may asynchronously return following updates:

N/A

Possible business exceptions

Common context

  • Service isn't able to send forwarded message if it wasn't found (deleted/ID error);
  • Service isn't able to send forwarded message if type of that message is container. Function is not supported ;

Service to service dialog

Sending forwarded messages from service to service is not available, function is not supported.

Service to user dialog

  • Sending forwarded messages to a user who banned a service ( put a service into a black list) is not available;
  • Sending forwarded messages to a user is not available if a dialog wasn't found (deleted/ID error);
  • Sending forwarded messages to a user is not available if Peer type and Peer ID specified in request to dialog doesn't match.

Service to channel dialog

  • Sending forwarded messages to a channel is not available if a channel wasn't found (deleted/ID error) or channel was banned;
  • Sending forwarded messages to a channel is not available if a service is not a channel subscriber and has no administrator/owner role assigned with a permission to write.

Service to group dialog

Sending forwarded messages to a group dialog is is not available if a service is not a member of this group.