Slack.Web.Chat.schedule_message
You're seeing just the function
schedule_message
, go back to Slack.Web.Chat module for more information.
Schedules a message to be sent to a channel.
Required Params
channel
- Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. ex:C1234567890
post_at
- Unix EPOCH timestamp of time in future to send the message. ex:299876400
Optional Params
as_user
- Pass true to post the message as the authed user, instead of as a bot. Defaults to false. Seechat.postMessage
. ex:true
attachments
- A JSON-based array of structured attachments, presented as a URL-encoded string. ex:[{"pretext": "pre-hello", "text": "text-world"}]
blocks
- A JSON-based array of structured blocks, presented as a URL-encoded string. ex:[{"type": "section", "text": {"type": "plain_text", "text": "Hello world"}}]
link_names
- Find and link channel names and usernames. ex:true
parse
- Change how messages are treated. Defaults to none. Seechat.postMessage
. ex:full
reply_broadcast
- Used in conjunction withthread_ts
and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults tofalse
. ex:true
thread_ts
- Provide another message'sts
value to make this message a reply. Avoid using a reply'sts
value; use its parent instead. ex:1234567890.123456
unfurl_links
- Pass true to enable unfurling of primarily text-based content. ex:true
unfurl_media
- Pass false to disable unfurling of media content. ex:false
Errors the API can return:
account_inactive
- Authentication token is for a deleted user or workspace.channel_not_found
- Value passed forchannel
was invalid.ekm_access_denied
- Administrators have suspended the ability to post a message.fatal_error
- The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.invalid_arg_name
- The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.invalid_arguments
- The method was called with invalid arguments.invalid_auth
- Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.invalid_charset
- The method was called via aPOST
request, but thecharset
specified in theContent-Type
header was invalid. Valid charset names are:utf-8
iso-8859-1
.invalid_form_data
- The method was called via aPOST
request withContent-Type
application/x-www-form-urlencoded
ormultipart/form-data
, but the form data was either missing or syntactically invalid.invalid_post_type
- The method was called via aPOST
request, but the specifiedContent-Type
was invalid. Valid types are:application/json
application/x-www-form-urlencoded
multipart/form-data
text/plain
.invalid_time
- value passed forpost_time
was invalid.is_archived
- Channel has been archived.missing_post_type
- The method was called via aPOST
request and included a data payload, but the request did not include aContent-Type
header.missing_scope
- The token used is not granted the specific scope permissions required to complete this request.msg_too_long
- Message text is too longno_permission
- The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.no_text
- No message text providednot_authed
- No authentication token provided.not_in_channel
- Cannot post user messages to a channel they are not in.org_login_required
- The workspace is undergoing an enterprise migration and will not be available until migration is complete.rate_limited
- Application has posted too many messages, read the Rate Limit documentation for more informationrequest_timeout
- The method was called via aPOST
request, but thePOST
data was either missing or truncated.restricted_action
- A workspace preference prevents the authenticated user from posting.restricted_action_non_threadable_channel
- Cannot post thread replies into a non_threadable channel.restricted_action_read_only_channel
- Cannot post any message into a read-only channel.restricted_action_thread_only_channel
- Cannot post top-level messages into a thread-only channel.team_added_to_org
- The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.time_in_past
- value passed forpost_time
was in the past.time_too_far
- value passed forpost_time
was too far into the future.token_revoked
- Authentication token is for a deleted user or workspace or the app has been removed.too_many_attachments
- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message.