sinch.domains.conversation.api.v1.transcoding_apis module

class sinch.domains.conversation.api.v1.transcoding_apis.Transcoding(sinch)[source]

Bases: BaseConversation

transcode_message(app_id: str, app_message: ~sinch.domains.conversation.models.v1.messages.types.app_message_dict.AppMessageDict, channels: ~typing.List[~typing.Literal['WHATSAPP', 'RCS', 'SMS', 'MESSENGER', 'VIBERBM', 'MMS', 'INSTAGRAM', 'TELEGRAM', 'KAKAOTALK', 'KAKAOTALKCHAT', 'LINE', 'WECHAT', 'APPLEBC'] | ~typing.Annotated[str, ~pydantic.types.Strict(strict=True)]], from_: str | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, to: str | None | ~sinch.core.sentinel.Unset = <sinch.core.sentinel.Unset object>, **kwargs) → TranscodeMessageResponse[source]

Transcodes the message from the Conversation API format to the channel-specific formats for the requested channels. No message is sent to the contact.

Parameters:
  • app_id (str) – (required) The ID of the app used to transcode the message.

  • app_message (AppMessageDict) – (required) The message to be transcoded.

  • channels (List[ConversationChannelType]) – (required) The list of channels for which the message shall be transcoded.

  • from (UnsetOr[Optional[str]]) – (optional) The sender of the message. Serialized as from.

  • to (UnsetOr[Optional[str]]) – (optional) The recipient of the message.

  • **kwargs –

    Additional parameters for the request.

  • from_ (str | None | Unset)

Returns:

The message transcoded for each requested channel, keyed by channel name.

Return type:

TranscodeMessageResponse

For detailed documentation, visit https://developers.sinch.com/docs/conversation/.