Hi Felix,

You are not urlencoding your base string properly, specifically the nvp part.

Tom


Sent from my iPod

On 25 aug. 2010, at 21:57, Felix <fix...@gmail.com> wrote:

> Hello there
> 
> Got an interesting situation where, although my app is xAuth enabled
> and (in theory) everything is in place the response is still 401,
> which means that I'm probably missing something
> 
> I am using POST over SSL to https://api.twitter.com/oauth/access_token
> my signature base is
> 
> POST&https://api.twitter.com/oauth/
> access_token&oauth_consumer_key=CONSUMER_KEY&oauth_nonce=5a10827b9b20fbc49c6c2e26e5145ef6&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1282765745&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=PASSWORD&x_auth_username=fixone
> 
> The entire POST looks like this
> 
> POST /oauth/access_token HTTP/1.1
> Host: api.twitter.com
> Connection: close
> Accept-encoding: gzip, deflate
> User-Agent: Zend_Http_Client
> Authorization: OAuth
> realm="",oauth_consumer_key="CONSUMER_KEY",oauth_nonce="5a10827b9b20fbc49c6c2e26e5145ef6",oauth_signature_method="HMAC-
> SHA1",oauth_timestamp="1282765745",oauth_signature="Co3f8kQMa7vbYzLGx5NF0js7BOQ
> %3D", oauth_version="1.0"
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 71
> 
> x_auth_mode=client_auth&x_auth_password=PASSWORD&x_auth_username=fixone
> 
> 
> And the response is , of course, "401 Unauthorized"
> 
> I would need some help figuring out what's wrong.
> 
> KR
> Felix
> 
> -- 
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group: 
> http://groups.google.com/group/twitter-development-talk?hl=en

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to