Authentication creditional problem


#1

I’m developing an app and everything was working fine, but all of a sudden started getting the following error on some users getting friends or followers. Most users are fine, but I only get this on some users and it seems to be consistently the same users. I know that the credentials are good and there is nothing wrong with my system clock. And again, it works fine for most users. I thought maybe it had something to do with protected users, but that doesn’t seem to prevent a friends/id call. Is there some other aspect of the user that would cause this? I’m using app-only auth, if that makes a difference

12/16/2013 09:14:47:438: sun.net.www.protocol.http.HttpURLConnection->writeRequests: FINE - sun.net.www.MessageHeader@1f0e5b3810 pairs: {GET /1.1/friends/ids.json?screen_name=Krystalmagick&cursor=-1&include_entities=1&include_rts=1 HTTP/1.1: null}{Authorization: Bearer xxxxx}{X-Twitter-Client-URL: http://twitter4j.org/en/twitter4j-3.0.6-SNAPSHOT(build: 6b148528110cab823a73f4ae60f90cae89fd2fb5).xml}{X-Twitter-Client: Twitter4J}{Accept-Encoding: gzip}{User-Agent: twitter4j http://twitter4j.org/ /3.0.6-SNAPSHOT(build: 6b148528110cab823a73f4ae60f90cae89fd2fb5)}{X-Twitter-Client-Version: 3.0.6-SNAPSHOT(build: 6b148528110cab823a73f4ae60f90cae89fd2fb5)}{Host: api.twitter.com}{Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2}{Connection: keep-alive}
12/16/2013 09:14:47:496: sun.net.www.protocol.http.HttpURLConnection->getInputStream: FINE - sun.net.www.MessageHeader@6786c97523 pairs: {null: HTTP/1.1 401 Unauthorized}{cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0}{content-encoding: gzip}{content-length: 141}{content-type: application/json;charset=utf-8}{date: Mon, 16 Dec 2013 14:14:47 GMT}{expires: Tue, 31 Mar 1981 05:00:00 GMT}{last-modified: Mon, 16 Dec 2013 14:14:47 GMT}{pragma: no-cache}{server: tfe}{set-cookie: guest_id=v1%3A138720328748053159; Domain=.twitter.com; Path=/; Expires=Wed, 16-Dec-2015 14:14:47 UTC}{status: 401 Unauthorized}{strict-transport-security: max-age=631138519}{www-authenticate: OAuth realm=“https://api.twitter.com”}{x-access-level: read}{x-frame-options: SAMEORIGIN}{x-rate-limit-limit: 15}{x-rate-limit-remaining: 0}{x-rate-limit-reset: 1387204186}{x-tfe-logging-1-request-category: API}{x-tfe-logging-2-request-category: API}{x-transaction: 292bfaaca3df3951}{x-xss-protection: 1; mode=block}
12/16/2013 09:14:47:497: com.technicacorp.twittergraph.TwitterGraph$ProcessUsers->processUser: WARNING - [Thread main] Exception while getting friends/followers for 115297083_Krystalmagick.user)
Exception: 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
{“request”:"/1.1/friends/ids.json?screen_name=Krystalmagick&cursor=-1&include_entities=1&include_rts=1",“error”:“Not authorized.”}

Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=23b8dec6 or
http://www.google.co.jp/search?q=19e99460
TwitterException{exceptionCode=[23b8dec6-19e99460], statusCode=401, message=null, code=-1, retryAfter=-1, rateLimitStatus=RateLimitStatusJSONImpl{remaining=0, limit=15, resetTimeInSeconds=1387204186, secondsUntilReset=898}, version=3.0.6-SNAPSHOT(build: 6b148528110cab823a73f4ae60f90cae89fd2fb5)}
Stack trace:
twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:162)
twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:89)
twitter4j.TwitterImpl.get(TwitterImpl.java:1911)
twitter4j.TwitterImpl.getFriendsIDs(TwitterImpl.java:409)
com.technicacorp.twittergraph.TwitterGraph.getFriendsOrFollowers(TwitterGraph.java:416)
com.technicacorp.twittergraph.TwitterGraph.access$3(TwitterGraph.java:365)
com.technicacorp.twittergraph.TwitterGraph$ProcessUsers.processUser(TwitterGraph.java:657)
com.technicacorp.twittergraph.TwitterGraph$ProcessUsers.findUserFiles(TwitterGraph.java:619)
com.technicacorp.twittergraph.TwitterGraph$ProcessUsers.run(TwitterGraph.java:595)
com.technicacorp.twittergraph.TwitterGraph.(TwitterGraph.java:89)
com.technicacorp.twittergraph.TwitterGraph.main(TwitterGraph.java:714)


#2

Did you manage to solve the problem? I’m struggling with the same thing now.


#3

#solved The problem occurs when you try to get friends of protected user.