Apigee For Twitter

This add-on is operated by Apigee

Apigee makes working with the Twitter API better

Apigee For Twitter

Last Updated: 19 March 2014

api apigee twitter

This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it.

Table of Contents

This add-on have been deprecated, and is now disabled for new installs.

Apigee makes working with APIs better, especially the Twitter API. By accessing the Twitter API through Apigee, you can receive significantly improved Twitter API rate limits when using OAuth authentication. This removes a major barrier for developers building Twitter applications - with the Apigee add-on, you can now handle more requests and traffic than ever before and build a better app. In upcoming versions, you will also be able to get Apigee’s full Analytics and Debugging features to see API performance metrics, understand usage, view requests and responses and dig into errors.

While Twitter's search methods at one time were available at api.twitter.com, those are no longer supported. Be sure to use the Apigee provided config var for search to make all your search requests.

Add-on installation

To use (add-on) on Heroku, install the Apigee add-on:

$ heroku addons:add apigee

Local setup

Activating the add-on will create two private Twitter API endpoints for you as configvars. To use Apigee, simply make any normal request to api.twitter.com or search.twitter.com, but instead use the config var APIGEE_TWITTER_API_ENDPOINT in place of api.twitter.com and APIGEE_TWITTER_SEARCH_API_ENDPOINT in place of search.twitter.com.

Using OAuth with Apigee

In order to use OAuth with Apigee, there are two important steps to keep in mind:

  1. All API requests are made through Apigee, except for the OAuth dance
  2. API requests must be signed as if they are going directly to Twitter (using http://api.twitter.com in the base string) but then sent through your Apigee endpoint.

After you activate the add-on, Apigee will create a private endpoint for your API requests. You can continue to request user tokens as you have before, and likewise, you would continue to build the base string with http://api.twitter.com . But instead of sending those requests directly to http://api.twitter.com , you instead send them to your configvar, e.g. http://APIGEE_TWITTER_API_ENDPOINT instead.

Note: several gems have been reported to support the use of proxies with the Twitter API:

Additional resources

  • Notes on configuring your local development environment (example uses the REST API endpointóadjust for your Facebook configvar; you may wish to configure the search endpoint in a similar fashion).
  • Apigee.com
  • Support community
  • Apigee is designed to be a highly available service