Thanks for your reply. I just tried that and still the same 401 error.
The new header was like this with spaces after each comma:
I'm also sure no call is made during the generation of the header.
According to other posts I've read, this header is created using a GET
and uses the following URL:
Any other ideas would be grateful, as I've spent over a week on trying
to get Twitpic to work.
On Jul 26, 3:38 pm, Taylor Singletary <taylorsinglet...@twitter.com>
> Hi Gerard,
> Though I know it doesn't sound like it should matter, can you try your
> request against Twitpic after inserting spaces after each comma in
> your Authorization Header? Also want to make sure that you aren't
> executing your verify_credentials request in the preparation sequence
> (calling the resource prior to TwitPic calling it would invalidate
> On Mon, Jul 26, 2010 at 7:26 AM, globaljobber
> <gerardn...@exciteinternet.co.uk> wrote:
> > 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