Skip to content

How to use API Proxy

marguerite edited this page Nov 4, 2012 · 9 revisions

1. Supported API Proxies

API proxy was, is and will be commonly and widely used by most users from China behind the firewall.

What is API proxy?

Contributors outside mainland China always be perplexed by the ambiguity of API proxy. We do know API is the abbreviation of Application Program Interface and Proxy is a redirect method. So the combination of them means here we create a program functions rebinding an API call to twitter.com, that is blocked by Bin Xing Fung and his great firewall, to our web based application and calling to twitter.com from it. this two way program works like a proxy, but it does not re-transfer the normal http request but twitter API calls.

During the re-transfer, calls can be modified by our application or not. if they are, Override mode outcomes; if not, here comes Transparent Mode.

Hotot has been tested with these four API proxies.

2. Using Twip

Twip is a PHP-based API proxy. The latest version(Twip4) works in two different modes, T(transparent) mode and O(override) mode.

Hotot supports both of them recently.

2.0 Special Warning

  • Do not even try it on Free Hosting. Most of the US Free service providers blocked registration from China and access to Twitter a long time ago. And their ADs will interfere Twip's output for sure. (it means even if you can setup successfully, you can't use it) We have tried the first 11 pages of Google Search, so don't waste your time!
  • The only supported free services are called PaaS. But it's not our job to teach you Linux here.

2.1 Using T mode of Twip (Recommend)

  • Setup your Twip (visit the Twip Wiki for more info, and keep in mind that BASE_URL can't be empty);
  • Launch Hotot for the 1st time, create a Twitter profile, but do not get oauth token;
  • Go to "Preferences"->"Advanced"->API Settings;
  • Fill text entry "API Base" with your API_BASE_URL/t/(take care of the ending backlash.)
  • Make sure you have unchecked "Same signing API base"
  • Make sure the URL in text entry "Signing API Base" is "https://api.twitter.com/1.1/"
  • Fill text entry "OAuth Base" with your API_BASE_URL/t/oauth/
  • Make sure you have unchecked "Same signing OAuth base"
  • Make sure the URL in text entry "Signing OAuth Base" is "https://api.twitter.com/oauth/"
  • Press OK to save your changes.
  • Sign out, use OAuth to sign in.
  • Copy the url in the textbox, open it in your browser, input your twitter username and password, authorize our application, click "okay", returns a string, now input it in Hotot.
  • Now success! Congrats and enjoy yourself.

2.2 Using O mode of Twip

  • Setup your Twip (visit the Twip Wiki for more info, and keep in mind that BASE_URL can't be empty);
  • Launch Hotot, Create an identi.ca profile
  • Go to "Preferences"->"Advanced"->API Settings;
  • Fill text entry "API Base" with your API_BASE_URL/o/Random_String_Generated_By_Twip/
  • Make sure you have checked "Same signing API base"
  • Press OK to save your changes.
  • Restart Hotot, use basic auth to sign in.

Notice that the username or password is ignored when using o mode,so you can input anything.

Notice that if you are using Twip (3.x), the password is the Twip password, not your twitter password.

2.3 Search API Base and Upload API Base

  • In T and O modes, Search API Base are the same as API Base.

  • In T mode, Upload API Base is the same as API Base; while in O mode, it's another URL given by Twip.

Tutorial below is NOT reviewed and tested with the last version, so its availability is unknown.

3. Using Stap

Visit the Stap Wiki for more info.

4. Using Gtap

Gtap is a simple solution running on Google App Engine which can proxy the HTTP request to twitter's official REST API URL.

  • Setup your Gtap (visit the Gtap Wiki for more info);
  • Launch Hotot, Create an identi.ca profile
  • Go to "Preferences"->"Networks"->API Settings;
  • Fill text entry "API Base" with your API_BASE_URL
  • Make sure you have checked "Same signing API base"
  • Press OK to save your changes.
  • Restart Hotot, use basic auth to sign in.

Notice that the password is the GTAP password, not your twitter password.

5. Using Jtapi

Like Gtap, Jtapi is an Oauth solution based on Google App Engine.

  • Setup your Jtapi (visit Twidere Wiki for tutorial)
  • Launch Hotot, Create an identi.ca profile
  • Go to "Preferences"->"Advanced"->API Settings;
  • The ordered output of Jtapi can be input into Hotot settings one by one directly.
  • Press OK to save your changes.
  • Restart Hotot, use Oauth to sign in. (Username and Password should be the same as you login Twitter.com)

GOOD LUCK!

Marguerite.