My Sever IP blocked or banned? please help


#1

MY server IP:103.6.33.5
The twitter REST & streaming API getting timed out. I think server IP is blocked.
When I run below command on command line getting this error-

curl --verbose “https://api.twitter.com/1/help/test.json

  • About to connect() to api.twitter.com port 443 (#0)
  • Trying 104.244.42.130… Connection timed out
  • Trying 104.244.42.66… Connection timed out
  • Trying 104.244.42.194… Connection timed out
  • Trying 104.244.42.2… Connection timed out
  • couldn’t connect to host
  • Closing connection #0
    curl: (7) couldn’t connect to host

Please help me to resolve this issue. Also guide me to avoid such issues.


#2

I don’t think the https://api.twitter.com/1/help/test.json url should work - looks like it API version 1, which is deprecated

Try the “Oauth Signature Generator” tool on https://dev.twitter.com/rest/reference/get/help/configuration or any other enpoint for example, which will give you the correct curl command to test.

It should have the OAuth parameters and look something like:

curl --get 'https://api.twitter.com/1.1/help/configuration.json' --header 'Authorization: OAuth oauth_consumer_key="your consumer key", oauth_nonce="...oauth nonce....", oauth_signature="....oauth signature....", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1468337898", oauth_token="...token....", oauth_version="1.0"' --verbose

Also make sure your system time is in sync, and curl works - try curl -cacert https://api.twitter.com --verbose