Create bots and use webhooks in Typetalk

banner704x440

Create Bots using APIs more easily

We have started to provide a new authentication system, which enables you to create Bots in Typetalk topics easily. In the past, you had to register an email address and verify that email address to create an account for API use. But now you don’t have to do that anymore. Now you can create Bots and use APIs within topics easily without registering an email address.

 

1-en

2-en

You can create a bot in the editing topic page. Click the Bots tab, “Add bot” button, and input the bot’s ID and Full name. The system will automatically append a “+” to the bot’s name, so you know it is a Bot. There are 2 scope options for the API: “topic.read” or “topic.post”. Click the checkboxes to set the scope for your bot.

3-en

After clicking the Create button, you can get a Typetalk Token. You can use topic APIs with this token. Try to execute a post message command on your computer! Click the Reset token if you want to change the Typetalk Token for this bot. Click “More” next to the “Get or Post Messages URL” box to see more APIs. See documentation and samples for details.

Use Webhook

4-en

We have also introduced the use of Webhook with bots. If you set a Webhook URL in the bot’s settings, you can receive post data on your web application when someone posts an @mention to this Bot, for example: “@bot+ Hello, bot!”. See documentation and samples for details. 

Typetalk support on Mackerel

Mackerel is a server monitoring service provided by Hatena Co., Ltd. and helps users manage cloud servers much more efficiently. We are using Mackerel to monitor servers in all of our services. Refer to this interview article about why we adopted Mackerel.

According to this release, Mackerel has started to support Typetalk as one of their notification channels to send server alerts!  As shown in the figure below, you just need to put the “Get or Post messages URL” of your bot account in the “Typetalk Channel” setting page.

mackerel_typetalk

Click “Create” and then run “Test” to check your settings. When something wrong happens on your server, you’ll receive alerts from Mackerel like this.

mackerel_alerts_sample

As shown here,  the “bot” account makes it more easy to use the Typetalk API and integrate your service with Typetalk. See also this announcement in the Mackerel Blog.

Typetalk Hack Tokyo

We will be organizing a Typetalk Hack event in Tokyo on Dec 16th. Come join us! Apply here.


Have a great idea or an awesome app to share? Don’t hesitate to share it with us in the comment section below, Twitter or Facebook. Happy developing!