The Twitter Follow fails - returns a 401 Unauthorized response


#1

I am trying to perform a Twitter follow request,
URL :: http://api.twitter.com/1/friendships/create.json?user_id=61996495 with Method POST , and no post data in it. Also sending the Authorization headers. This fails.
But the same oauth credentials work fine with the Twitter Status post.

Any help is appreciated.


#2

I’m having the same problem.

When I request from: https://api.twitter.com/1.1/ I get:
“400 - Bad Authentication data [code] => 215”

But when I request from https://api.twitter.com/1/ I get
"401 - “Could not authenticate you.”

I’m using @abraham’s twitteroauth library.


#3

Verify that your API keys are correct. If you’re making resource-based API requests, make sure that you’re leveraging a valid access token. Verify that your server time is within a few minutes of ours (we report our server time in the Date HTTP header).