Write robots

The following procedure shows how to write a robot that accesses a REST API that uses OAuth as its authentication mechanism. As an example, we use the Twitter REST API to obtain the most recent statuses by the authenticating user and the followed users.

  1. Start Design Studio and create a new Basic Engine Robot.

    Do not enter a URL in the wizard. You will not be able to access the REST API before authentication.

  2. To the robot, add a new variable of complex type OAuthCredentials and select Use as Input.
  3. In the serviceProvider field, type Twitter.
  4. Enter the access token and access token secret that were obtained when you went through the user authorization process in the Management Console. Also enter the consumer key and consumer secret for the Twitter application.


  5. Click OK.
  6. Click Configure Robot .

    The robot configuration window appears.

  7. On the Basic tab, click Configure.
  8. On the All Loading tab, locate Credentials and switch it from Standard user name/password authentication to OAuth.
  9. Select the input variable you just added.


    You should now see the XML that has been returned, containing the most recent statuses in the user timeline.

  10. Click OK in both dialogs.

    The robot is now configured to use OAuth and use the specified credentials when running in Design Studio. You can now start accessing the Twitter API. For example, to see a collection of the most recent Tweets posted by the user, you can access the URL https://api.twitter.com/1.1/statuses/user_timeline.json.