However, for large API workloads it's recommended that you use a dedicated account specifically provisioned for that purpose. For apps that act only on behalf of the user and make a small number of API requests a standard Webex user account can be used. Don't use end-user accounts for large workloads as it may affect the user's experience, and they are not guaranteed to work with large workloads that affect a whole organization. This section contains recommendations for applications that make a large number of API calls, or make API calls over a broad range of APIs.ĭon't use end-user accounts for large workloads.
See the RetryAfterDemo code repository on GitHub for a detailed example of handling 429 errors in Python. For example, to create distinct paragraphs, use two newline characters between the paragraphs: To include line breaks in your JSON message body, use standard Markdown paragraphs and line breaks with JSON newline characters. See below for examples of the formatting supported in the Webex Teams clients.īut, before we dive into the examples below, there's an important note we need to mention about line breaks: The examples below do not include any JSON newline characters ( \n) to create line breaks in Webex Teams messages-we've left them out to focus on just the specific Markdown example. Sending formatted text is super easy using the markdown parameter in the Messages API, though only a limited set of Markdown is supported at this time.
Bots and integrations can also send rich text messages formatted with Markdown, by using the Messages API. Webex Teams clients, across all platforms, can send and receive a limited form of rich text messages formatted using the Markdown markup language. Here's an example of using cURL to send a new message with a local file as a file attachment: When uploading files directly from your local filesystem, your request will need to be a multipart/form-data request rather than JSON. Optionally, you can also include a plain-text message with the attachment by using the text parameter. To send local file attachments, simply post a message by including your access token in the Authorization header and the path to your local file with the files parameter. Send a Message with Attachments Local File Attachments Here is the complete list of supported file types and extensions:
For these file types, Webex Teams clients will render a preview in the room and a full view when clicked. What you may not know is that Webex Teams has special support for most PDFs, Microsoft Word, Microsoft Excel, Microsoft PowerPoint, and most popular image formats. Message attachments are limited to 100MB each. Using the Messages API you can send messages containing text, text with attachments, or just share a file with the room without any text.
Webex Teams has native support for posting messages with file attachments. A rel="next" link header will be present if another page of results is available. If the requested max query parameter value exceeds what a particular API endpoint allows, only the maximum number of items allowed per page for that endpoint will be returned. For example, requesting GET /people?displayName=Harold&max=2 tells the API to return only 2 items per page. When requesting a list of resources the max query parameter may be used to control the number of items returned per page. We may include other link types, that are defined in the RFC5988 (Web Linking) standard, in the future. Please note that only the rel="next" link header is guaranteed at this time.
The list of possible relationship types are: This tells your app that another page is available and provides the URL to fetch it. Notice the rel="next" at the end of the line.