Error 401 or no content returned for user_timeline request on production server

javascript

#1

Hey guys, so we are utilizing twitter api to fetch user timeline data. On our development environments, we seem to use the user_timeline well enough. However, our production server, which did work for a while, started returning error:401, which devolves into bad authentication. Our credentials are the same as on our development environments, and I can even still use it right now.

Has our production server been blacklisted? How can well tell? How can we get it off the blacklist?
We are able to use other API endpoints with our production server, just not the user_timeline.

I would post code, but since we are using a library, and it works fine on our dev environments (not to mention it “was” working on the production server for a few hours). So I feel that code wouldn’t help.


#2

Is the time identical on both systems? OAuth requires the system time to be accurate.

What’s the JSON error message associated with the HTTP 401 error?


#3

Hey andypiper, thanks for dropping in. Our production server is about 4 seconds ahead, that may be a consequence of the server’s location however.

The response we get is from the module we use, so it’s not in JSON unfortunately.

I have done a twitter api test with curl for user_timeline. I’ve been able to get a 200 response in the test (on production). However our application seems to only return 401 with the module used. I may try changing to a different module and seeing if that will work.


#4

That’s annoying - what library are you using?

On the production system, you’re using the exact same tokens, right?

… just trying to walk through this logically :slight_smile:


#5

Hey andypiper, I’m using an npm library,
https://www.npmjs.com/package/twitter

I’m using the exact same tokens. I even created a new app to get completely new tokens and I’m getting the same issue.