Hi,

I am having trouble getting Twitpic to authorize an image upload
request.

I have checked my Oauth 'X-Verify-Credentials-Authorization'
authorization header with a call to
'https://api.twitter.com/' and I get a 200 OK status. So it appears my
authentication requests are ok.

However if I take the same header construct and make a request to
'http://api.twitpic.com/2/upload.json' using OAuth Echo with Twitpic I
continually receive a 401 Unauthorized response.

My typical setup is this:


Parameters for Twitpic:

Requiredparameters.Add("key", "97bfc7ffddd827ca9630232def4eea82");
Requiredparameters.Add("message", "This is a test upload");

requestUrl = OAuthUtility.AppendParametersForPOST("http://
api.twitpic.com/2/upload.json", Requiredparameters);

HttpWebRequest webRequest =
(HttpWebRequest)WebRequest.Create(requestUrl);
webRequest.Method = "POST";

webRequest.Headers.Add("X-Verify-Credentials-Authorization",
AuthorizationHeaderForAuth);
webRequest.Headers.Add("X-Auth-Service-Provider", "https://
api.twitter.com/1/account/verify_credentials.json");

where a typical AuthorizationHeaderForAuth looks like this:

OAuth realm="http://
api.twitter.com",oauth_consumer_key="9cjtddsslOYCRJqyp7XKzA",oauth_nonce="4D34866",oauth_signature_method="HMAC-
SHA1",oauth_timestamp="1230153261",oauth_token="15322554-7q4tTvSwJ9oB6iWZh7DvRjkn60eKTc1T4VRkNl4",oauth_version="1.0",oauth_signature="gbMRJ1OA9JNiZGksnRyFdT6iP20%3D"



Can anyone please suggest where things may be going wrong?

Many thanks
Gerard

Reply via email to