reply_message_thread

toloka.client.TolokaClient.reply_message_thread | Source code

reply_message_thread(
self,
message_thread_id: str,
reply: MessageThreadReply
)

Sends a reply message in a thread.

Parameters description

ParametersTypeDescription
message_thread_idstr

The ID of the thread.

replyMessageThreadReply

The reply message.

  • Returns:

    The updated message thread.

  • Return type:

    MessageThread

Examples:

Sending a reply to all unread messages.

message_threads = toloka_client.get_message_threads(folder='UNREAD')
message_reply = {'EN': 'Thank you for your message! I will get back to you soon.'}
for thread in message_threads:
toloka_client.reply_message_thread(
message_thread_id=thread.id,
reply=toloka.client.message_thread.MessageThreadReply(text=message_reply)
)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming