Configuring Twitter in Jitterbit App Builder
App Builder does not natively support Twitter, either as an authentication or data provider. However, since the Twitter API is fundamentally a REST API, secured using the OAuth Client Credential flow, it's possible use App Builder's generic HTTP security provider to retrieve data from Twitter.
Twitter's documentation for application-level authentication using the OAuth Client Credentials flow can be found here:
https://dev.twitter.com/oauth/application-only
The main tasks involved include:
- Register App Builder as a Twitter application.
- Create a Twitter HTTP security provider
- Create a Twitter data source.
It's assumed that your organization already has an existing Twitter account.
Register App Builder as a Twitter application
Start by signing into the Twitter Application Management web site.
- Click the Create New App button (upper right)
-
Provide the following information:
-
Name: A logical name for the App Builder environment or application.
Example: ACMEApp BuilderDev
-
Description: A description of the App Builder environment or application.
Example: App Builder application development at ACME.
-
Website: App Builder web application URL.
Example:
https://dev.example.com/App Builder/
-
-
Agree to the developer agreement
- Click the Create your Twitter application button
-
Under Application Settings, make a note the following properties:
-
App-only authentication: This will be the value of the TokenEndpoint when configuring the HTTP security provider within App Builder.
Example:
https://api.twitter.com/oauth2/token
-
-
Under Application Settings, click the manage keys and access tokens link
-
Make a note the following properties:
- Consumer Key (API Key): This will be the value of the ClientId when configuring the HTTP security provider within App Builder.
- Consumer Secret (API Secret): This will be the value of the ClientSecret when configuring the HTTP security provider within App Builder.
Create a Twitter HTTP security provider
To create an HTTP security provider, start by signing into App Builder as an administrator.
- Navigate to the IDE
- Select the Security Providers button
- In the User Authentication panel, click the + User Authentication button
-
Provide the following:
- Name: Twitter
- Type: HTTP
-
Priority: A unique integer between 10 and 100. Note that this value must be unique.
Example: 50
-
Enabled: Check
-
Click the Save button
-
Set the following properties. In the Properties panel, click the + Property button → Select the Parameter → Provide the Value → Click the Save icon.
- AuthenticationType: ClientCredentials
-
TokenEndpoint: The {App-only Authentication} endpoint provider by Twitter.
Example: https://api.twitter.com/oauth2/token
-
ClientId: The {Consumer Key} provided by Twitter
- ClientSecret: The {Consumer Secret} provided by Twitter
Create a Twitter data source
To create a Twitter data source, start by signing into App Builder as an administrator.
- Navigate to the IDE
- Select the Data Servers button
- In the Data Servers panel, click the + Server button
-
Provide the following:
- Name: Twitter
- Type: REST API
- URL: https://api.twitter.com/1.1/
- Security Provider: Twitter
-
Click the Save button
- Click the Tables icon to add in the Endpoints information
- In the Endpoints panel, click the + Endpoint button
-
Provide the following:
- Name: user_timeline
- Endpoint: statuses/user_timeline.json
-
Click the Save button
- Click the Close icon (X) to dismiss the Endpoint popup
- In the Endpoint Parameters panel, click the + Parameter button
-
Provide the following:
- Name: screen_name
- Data type: String
- Test value: twitterapi
-
Click Save
- Click the Close icon (X) to dismiss the Input Parameter popup
- In the Web Service Parameters panel, click the + Parameter button
-
Provide the following:
- Name: count
- Data type: Integer
- Usage: Request Limit
-
Click the Close icon (X) to dismiss the Web Service Parameter popup
-
In the Endpoints panel, click the Discover button
This discover process will populate the Output Tables panel.
-
In the Output Tables panel, locate the user_timeline table and click the Content icon.
Assuming everything has been configured correctly, you should see a timeline for the twitterapi account.