Facebook isn’t the only social network beefing up the customer-service functionality of its chat bots, as Twitter Thursday announced the launch of several direct message application-programming interfaces to enable developers to build out more robust customer-service tools.
— TwitterDev (@TwitterDev) April 6, 2017
Group product manager Ian Cairns said in a blog post that the new DM APIs are aimed at allowing developers to enhance not only DMs, but also the entire Twitter platform, including public tweets, with an eye toward giving businesses the ability “to deliver faster, richer and more engaging human- and bot-powered customer service, marketing and engagement experiences.”
Cairns detailed Thursday’s new API releases:
- The new beta Account Activity API for subscribing to real-time activities related to an account. With today’s release, DMs can now be delivered via webhooks and include support for new features like quick replies (https://blog.twitter.com/2016/speed-up-customer-service-with-quick-replies-welcome-messages-in-direct-messages).
- A new DM POST endpoint for sending DMs. This endpoint uses a new JSON format that supports features like quick replies and shared media.
- Updated DM GET endpoints for retrieving data asynchronously via the REST API, with the same new payload elements as the webhooks service. We are releasing a “show” endpoint, as well as a new “list” endpoint that combines sent and received messages into one response.
- New welcome message endpoints to create and manage welcome messages in DMs.
Cairns also provided details on two features that are currently in private beta:
- Custom profiles allow developers to override the default avatar and name attached to a given message in order to show the identity of the human agent or bot sending the message.
- Customer feedback cards allow businesses to collect feedback on the experiences they provide on Twitter, whether for human or bot interactions.
Finally, Cairns said plans for “the coming months” include:
- Expanding the scope of activities delivered via the Account Activity API to include the following for an authorized account: replies, mentions, retweets, likes, follows and more.
- Enterprise features designed to enable large-scale access and ensure you never miss an activity.
Twitter also announced plans to unify its API platform, combining its Gnip, streaming and REST APIs, which it said will lead to a more consistent experience and enable easier scaling by developers.
Staff developer advocate Andy Piper made the announcement in a blog post:
Twitter’s API platform enables a robust ecosystem of developers and innovators to build solutions using public Twitter data that serve a wide range of needs. Today, we’re excited to announce that we’ll be unifying our API platform to make it easier for developers to build new applications that can smoothly scale as they grow. We’re also launching new APIs and endpoints that enable developers to build on the unique attributes of Twitter to create better experiences for businesses. Developers can see where we’re focusing and what we’re building with our newly published API platform roadmap.
Later this year, we’ll be launching a new developer experience that combines the free and easy access of the standard REST and streaming APIs with the enterprise-grade power and reliability of Gnip. The goal is to create an integrated Twitter API platform that serves everyone, from an individual developer testing a new idea to Twitter’s largest enterprise partners. This will simplify and strengthen our developer platform so that anyone building with us can confidently create and scale their applications, products and businesses.
Piper outlined the benefits to developers:
- Unified API experience: We will streamline APIs so that developers will no longer have to contend with different access and delivery protocols as they scale. This means one API for filtering data from the firehose; one API for searching the Twitter archive; and one API for getting real-time activities related to an account—including tweets, DMs, likes and follows.
- Scalable access: All of these APIs will provide tiers of access—free access for testing new ideas and building new products; self-serve, paid access that provides increased functionality and rate limits to scale as you grow; and enterprise level access that offers the most powerful functionality for our largest and most strategic developer partners.
- Predictability: We’ll clearly define the features and costs at each tier so you can determine the right level of access for your needs now and in the future.
Finally, Piper provided an overview of future updates and launches:
Later this year, we’ll launch a new set of tools that enable developers to sign up, access and manage APIs within a self-managed account. This will include the ability to get deeper access and more features, all with a transparent pricing model.
We’ll also be shipping a new Search API that provides free access to a seven-day lookback window with more sophisticated query capabilities and higher-fidelity data retrieval than is currently available. We’ll also provide a seamless upgrade path to full-fidelity 30-day or full archive lookback windows.
Along with these product updates, we’ll also be providing improved guidance around key areas of the platform and simplifying our API footprint to help us move faster. Important changes to note include:
- Today’s update to our automation rules, providing clear guidance to developers building bots and automated experiences on Twitter.
- A plan to replace User Streams and Site Streams with the Account Activity API.
- A plan to replace the public statuses/filter, statuses/sample and search/tweets endpoints with a streamlined API that provides increased access when rate limits are reached.