401 error with desktop app


#1

I’m trying to create an oAuth login for our desktop application.

The first part seems to go OK https://api.twitter.com/oauth/request_token
and I get a token back which I pass to
(“https://api.twitter.com/oauth/authorize?oauth_token=”+sAuthToken)
and I get the login page and on login in I get the PIN code

However posting the relevant info to https://api.twitter.com/oauth/request_token and I get a 401 error back again.

Any clues ?

As you can see I’m using Chilkat to do this

Thanks

ChilkatLog:
PostUrlEncoded:
DllDate: Oct 30 2012
UnlockPrefix:xxxxxxx
Username: xxxxxx
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
url: https://api.twitter.com/oauth/request_token
RequestData:
HttpVersion: 1.1
Verb: GET
Path: /
Charset: windows-1252
SendCharset: 0
MimeHeader:
–RequestData
httpConnect:
hostname: api.twitter.com
port: 443
ssl: 1
Should already be connected to the HTTP server…
Connected
–httpConnect
connectTime1: Elapsed time: 0 millisec
sendRequestGetResponse_1:
sendRequest:
Adding Host header…
host: api.twitter.com
port: 443
Not auto-adding cookies.
AddOAuth1Header_2:
oauth_timestamp: 1407939622
oauth_nonce: yX4hqAYdHuK3iZFGFU5HVpxhBgM=u5F31Na8DSup1nUsMN4sQeHc5y0=
oauth_consumer_key: Y3bxBkjUOrnydSliCUXPg
oauth_verifier: 6267638
oauth_callback: oob
oauth_signature_method: HMAC-SHA1
fullUrl: https://api.twitter.com/oauth/request_token
–AddOAuth1Header_2
sortedParams:
oauth_hdr: oauth_callback
oauth_hdr: oauth_consumer_key
oauth_hdr: oauth_nonce
oauth_hdr: oauth_signature_method
oauth_hdr: oauth_timestamp
oauth_hdr: oauth_token
oauth_hdr: oauth_verifier
oauth_hdr: oauth_version
–sortedParams
baseStringURI: https://api.twitter.com/oauth/request_token
baseStringURI_encoded: https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token
normalizedParams: oauth_callback=oob&oauth_consumer_key=Y3bxBkjUOrnydSliCUXPg&oauth_nonce=yX4hqAYdHuK3iZFGFU5HVpxhBgM%3Du5F31Na8DSup1nUsMN4sQeHc5y0%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1407939622&oauth_token=K4yrjS9OPJGAjVmnpaJCIvKXs77w02GM&oauth_verifier=6267638&oauth_version=1.0
normalizedParams_encoded: oauth_callback%3Doob%26oauth_consumer_key%3DY3bxBkjUOrnydSliCUXPg%26oauth_nonce%3DyX4hqAYdHuK3iZFGFU5HVpxhBgM%253Du5F31Na8DSup1nUsMN4sQeHc5y0%253D%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1407939622%26oauth_token%3DK4yrjS9OPJGAjVmnpaJCIvKXs77w02GM%26oauth_verifier%3D6267638%26oauth_version%3D1.0
signatureBaseString: POST&https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_callback%3Doob%26oauth_consumer_key%3DY3bxBkjUOrnydSliCUXPg%26oauth_nonce%3DyX4hqAYdHuK3iZFGFU5HVpxhBgM%253Du5F31Na8DSup1nUsMN4sQeHc5y0%253D%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1407939622%26oauth_token%3DK4yrjS9OPJGAjVmnpaJCIvKXs77w02GM%26oauth_verifier%3D6267638%26oauth_version%3D1.0
oauth_signature: 3LvydpsUrBenoOx1DdOU0AimVUA=
–sendRequest
–sendRequestGetResponse_1
sendRequestTime: Elapsed time: 0 millisec
---- Reading HTTP Response ----
readResponse2_4:
No transfer-encoding header field.
sslContentLength: 44
extraLen: 0
readResponseTime: Elapsed time: 265 millisec
–readResponse2_4
responseStatus: 401
–PostUrlEncoded
Success.
–ChilkatLog