Hi Alain,

It seems i have to specify the "Content-Type: application/atom+xml".
I was using simple "application/xml".  Adding "Content-Type:
application/atom+xml" and "GData-Version: 3.0"  solved the issue.

It seems i missed this in the documentation.  IMHO i feel it is better
to include what Content-Type to use as note in the documentation.

I will look into oauth2 as well.

Thanks for your help.


On Nov 18, 2:28 am, Alain Vongsouvanh <[email protected]> wrote:
> Hello Rick,
>
> You can try to get the differences in the header by using OAuth Playground:
> googlecodesamples.com/oauth_playground/
> This tool lets you set your own consumer key and secret, and even your
> tokens so you can generate the signature base and the signature and compare
> with what is sent by your application.
>
> Also, omniauth supports OAuth
> 2.0<http://code.google.com/apis/accounts/docs/OAuth2.html>,
> I would suggest to switch to this authorization mechanism instead as it is
> much easier to implement.
>
> Best,
> Alain
>
>
>
>
>
>
>
>
>
> On Wed, Nov 16, 2011 at 5:23 AM, Rick <[email protected]> wrote:
> > Hi,
>
> > I am trying to add/update a contact using google contacts data api. Am
> > using ruby and omniauth gem.  It throws "401 Unknown authorization header"
> > error.  Whereas same code instead of post/put if i send get or delete
> > request it works perfectly fine.  This shows whenever i send the body
> > (which is needed to add or update a contact) in the request it throws this
> > error.
>
> > I used the packet capture tool and captured the packet.  The only
> > difference i can see between post/put vs get/delete request
> > is oauth_body_hash.  So i tried removing oauth_body_hash from header. Still
> > it throws the same error.
>
> > Any help on this would be much appreciated.
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
> > To post to this group, send email to
> > [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://code.google.com/apis/contacts/community/forum.html
>
> --
> Alain Vongsouvanh | Developer Programs Engineer

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/contacts/community/forum.html

Reply via email to