According to the OAuth spec, values in the Authorization header:
For each parameter, the name is immediately followed by an '=' character
(ASCII code 61), a '"' character (ASCII code 34), the parameter value (MAY
be empty), and another '"' character (ASCII code 34).
You need to quote your parameter values.
On Tue, Sep 22, 2009 at 17:42, Chad Etzel <c...@twitter.com> wrote:
> Please include both HTTP request/response headers+body. This will aid
> in debugging the call.
> On Tue, Sep 22, 2009 at 7:14 PM, adam <duffy.a...@gmail.com> wrote:
> > Hi Everyone,
> > I am trying to update from basic auth to oauth. basic auth works fine
> > but my oauth returns error 401 invalid/expired token. I know my token
> > is valid and the time on my computer is correct. A co-worker was able
> > to get the call working in php using the same token and key. our base
> > strings are the same and our http request is the same (with the
> > expected variances such as timestamp and nonce), his works and mine
> > does not. I created my own oauth code in c# and it is working fine
> > for six other oauth sites.
> > Here is the http request:
> > POST /statuses/update.xml HTTP/1.1
> > Content-Type: application/x-www-form-urlencoded
> > Authorization: OAuth
> > realm=www.oauth.net,oauth_version=1.0,oauth_consumer_key=
> > %3D,oauth_signature_method=HMAC-
> > SHA1,oauth_timestamp=1253660116,oauth_token=[removed]
> > Host: twitter.com
> > Content-Length: 11
> > Connection: Close
> > status=test
Internets. Serious business.