Just for doublechekking.

Your first post showed "X-Auth-Service-Provider" was JSON. If you signed to
"https://api.twitter.com/1/account/verify_credentials.xml";,
X-Auth-Service-Provider
also must be XML.

Andy

On Sun, Jul 25, 2010 at 5:03 AM, globaljobber
<gerardn...@exciteinternet.co.uk> wrote:
> Hi Andy, thanks for replying.
>
> Yes, I did sign the url as you mention.
>
> As a test, I also sent a request to
>
> "https://api.twitter.com/1/account/verify_credentials.xml";
>
> From this I get authorization ok using a standard call when using an
> "Authorization" header, but as soon as I use the header "X-Verify-
> Credentials-Authorization" then I get the 401 not authorized.
>
> I created the signed request using a GET not a POST, then modify the
> Realm part, as instructed by other posts. The credentials were creatd
> using the request url of "https://api.twitter.com/1/account/
> verify_credentials.xml".
>
> As far as I can tell, I am doing everything correctly - but obviously
> not. Can't fathom what the problem is, I wish Twitter API provided
> more feedback for debugging.
>
> Regards
> Gerard
>
>
>
>
> On Jul 24, 12:40 pm, Andy Matsubara <andymatsub...@gmail.com> wrote:
>> Did you sign to 
>> thehttps://api.twitter.com/1/account/verify_credentials.jsonto get the
>> credentials?
>> The signed url must be the same as X-Auth-Service-Provider.
>>
>> Andy Matsubara
>>
>> On Sat, Jul 24, 2010 at 10:57 PM, globaljobber
>>
>> - Hide quoted text -
>>
>> - Show quoted text -<gerardn...@exciteinternet.co.uk> wrote:
>> > Hi,
>>
>> > Been on this for a week. Am having trouble uploading image to Twitpic
>> > with Oauth. I get user to authenticate ok, receive access_token, etc.,
>> > and then try to make a httpwebrequest POST after generating X-Verify-
>> > Credentials-Authorization string.
>>
>> > I am always getting a 401 Unauthorized Access response. Has anyone
>> > anywhere on the planet done this with ASP.NET yet who could help?
>> > Seems no one has.
>>
>> > Here is part of the post that I generate, including headers:
>>
>> > --76a18be812b446b599adabd8c9b6fee0
>> > Content-Disposition: form-data; name="X-Auth-Service-Provider"
>>
>> >https://api.twitter.com/1/account/verify_credentials.json
>> > --76a18be812b446b599adabd8c9b6fee0
>> > Content-Disposition: form-data; name="X-Verify-Credentials-
>> > Authorization"
>>
>> > OAuth realm="http://
>> > api.twitter.com/",oauth_consumer_key="9cjtDDCxlOYSSJqyp7XKzA",oauth_nonce="6C850587",oauth_signature_method="HMAC-
>> > SHA1",oauth_timestamp="1233928528",oauth_token="15321156-7q4tTvSwJ9oB6iWZh7DvRjkn60eKTc1T4VRkNl4",oauth_version="1.0",oauth_signature="9FJK45EJtW4EfpnJla6S
>> > %2BGIqvuE%3D"
>> > --76a18be812b446b599adabd8c9b6fee0
>> > Content-Disposition: form-data; name="message"
>>
>> > Test image upload
>> > --76a18be812b446b599adabd8c9b6fee0
>> > Content-Disposition: form-data; name="key"
>>
>> > 97bfc758472981ds9630232def4eea82
>> > --76a18be812b446b599adabd8c9b6fee0
>> > Content-Disposition: file; name="media"; filename="DSC_222222.jpg"
>> > Content-Type: image/jpeg
>>
>> > Much appreciate any help from someone.
>> > Thanks
>> > Gerard

Reply via email to