Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Twitter Connector

This document describes how to enable your Twitter account for API access. This is required for using the Twitter Connector.

To enable API access, you need to create a "Twitter Application" on the Twitter Developer website. Obtain API credentials which are needed to configure the Twitter cloud connectors.

Technical Reference: Twitter Connector

Create a New Twitter Application

  1. Log into twitter.com and sign in. If you don’t have a Twitter account, create one.

  2. Change your browser location to https://apps.twitter.com.

  3. Click Create New App. You need to specify an app name, description, web site URL, a callback URL, and agree to their developer agreement. You can use http://www.example.com for both the web site URL and callback URL as placeholders until you have actual URLs (if you plan to make your app available to others).

  4. Click the Keys and Access Tokens tab, and click Create my access token.

  5. Copy the following credentials from your Twitter API application page to the Twitter connector configuration:

    • Consumer Key

    • Consumer Secret

    • Access Token

    • Access Token Secret

Change Access Level (If Necessary)

If you are building a project that writes to Twitter, to post Tweets as an example, you need to enable write-access for this Twitter application. To proceed with the following steps, you need to have registered your mobile phone number with Twitter. For more information about how to register your number, see this Twitter support article.

  1. In the apps.twitter.com page for your app, Applications Management page for your app, click the Permissions tab:

    TwitterAccessLevel

  2. Click the access level you want.

  3. Click Update Settings.

Obtain API Credentials

The final step is to generate an access token. If you have not yet created an access token, you see an option to create as detailed below. If you have already created the access token, you can also generate a new one by following these steps. The access token is generated based on the access level specified (in the above steps), so if you change your access level, you need to create a new access token.

  1. Click the Keys and Access Tokens tab. Under the Your Access Token section, click the Create my access token button. 

  2. The page refreshes, your new access token generates, and it’s ready to use.

You have completed the steps for creating a Twitter application. You now need to copy the Consumer key, Consumer secret, Access token, and Access token secret into Anypoint Studio to configure the Twitter connector.

As you copy fields from the Twitter application menu to the Anypoint Studio connector configuration, be sure that you do not copy in additional leading/trailing characters or spaces. It is a good idea to visually confirm that your copy and paste functions did not capture surrounding characters.