Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

 

I have already wasted enough time on getting this contacts using oAuth google API's. I dont know what wrong i am doing. Please correct me if i am.

 

This is the URL i am sending:

 

SZ_CPY(pMe->m_szURL, "https://www.google.com/accounts/OAuthGetRequestToken");

 

These are the headers i amd sending:

 

SZ_CPY(pMe->m_szHeader, "Content-Type: application/x-www-form-urlencoded\n");SZ_CAT(pMe->m_szHeader, "Authorization: OAuth ");

 

I am sending the request using POST method as in Google link, it was said to send using GET or POST. So i chose the later one. Now iam adding these things in postbuffer.

 

        SZ_CAT(pMe->szPostBuf, "oauth_callback=oob");        SZ_CAT(pMe->szPostBuf, "&oauth_signature=anonymous");               SZ_CAT(pMe->szPostBuf, "&oauth_version=1.0");                SZ_CAT(pMe->szPostBuf, "&oauth_nonce=eca7cac4e01a00f2a7e9f915924bfa56");        SZ_CAT(pMe->szPostBuf, "&oauth_signature_method=HMAC-SHA1");        SZ_CAT(pMe->szPostBuf, "&oauth_consumer_key=anonymous");        dwSec = ISHELL_GetTimeMS(pMe->m_pIShell);        SZ_CAT(pMe->szPostBuf, "&oauth_timestamp=1307956019");                SZ_CAT(pMe->szPostBuf, "&scope=http%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2F");        pMe->postLen =  pMe->postBufSize = SZ_LEN(pMe->szPostBuf);

 

I am sending this using IWeb_GetResponceV and i am getting the below mentioned error and 400.

 

signature_invalidbase_string:POST&https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthGetRequestToken&oauth_callback%3Doob%26...

 

Please help me if any has knowledge on this.

 

Thanks

Jithendra

 

read 9.1 & 9.2 for knowing how to create oauth_signature for HMAC-SHA1:
http://oauth.net/core/1.0/#anchor14
 
i am not sure though, but from the article above, it seems that the parm oauth_signature cannot be anonymous for oauth_signature_method=HMAC-SHA1

read 9.1 & 9.2 for knowing how to create oauth_signature for HMAC-SHA1:
http://oauth.net/core/1.0/#anchor14
 
i am not sure though, but from the article above, it seems that the parm oauth_signature cannot be anonymous for oauth_signature_method=HMAC-SHA1