Skip to main content
Version: 2.0.0

Try out GetReply APIs via platform

Open the Open Platform

Click the "OPEN API" on the toolbar at the top left of this page, select Service APIs, to open the open platform on a new page. open 2

Ways to call commonly used APIs

Create a new user

  • Select MutateChannelUsers API/chatbot/v1alpha1/agents/{agentId}/channels/{channelId}/users/mutate of ChannelUserService3
  • Click "Try it out" and fill in all configuration items. 4
    • For details in finding robot ID and channel ID, see Create users and replies via APIs5
    • The following is an example of the body section:
      {
      "operations": [
      {
      "create": {
      "username": "username here",
      "nickname": "nickname here",
      "avatarUrl": "https://newtestchatbot.wul.ai/help/zh/img/logo_large.png"
      }
      }
      ]
      }
  • Click "Execute", you can find the new user created through API on the "Analyze - Message Log - By User" page. create-user

Get reply

You need to create a skill first before calling this API. For ways to create a skill, see Build the First Agent.

  • Select GetReply API/chatbot/v1alpha1/agents/{agentId}/channels/{channelId}/environments/{environment}/getReply of ChannelRepyService7
  • Click "Try it out" and fill in all configuration items. 8
    • For details in finding robot ID and channel ID, see Create users and replies via APIs
    • If the current version has not been published, you can set the "environment" as "sketch". Otherwise, set it as "product". 9 The following is an example of the body section:
       {
      "username": "username here",
      "query": {
      "text": {
      "content": "hi"
      }
      }
      }
  • Click " Execute", and you can see the preset response given by the agent in the "Response body" section below. agent-reply
  • At the same time, a new log can be found on the relevant page of "Analyze - Message Log". message-loguser-logmessage-record
note

The agent can also give a preset response even though you call this API without a pre-created user, but the data can not be written to the log.