I’m trying to upgrade may program to support the new oAuth that Google uses in the AdWords.
I’ve my on-line part, which work fine, and get the access tokens (token, secret and consumer key).
My problem is when I try to make a soap request later with those credentials.
A. Which information do I need to save from the OnLine part? so far I save only the accessToken and the accessTokenSecret.
B. How do I use the accessToken, accessTokenSecret and what ever else I’ve saved in order to make a SOAP requests?
Some info on my process:
- Not using the Client Library from Google (too much over head, and so far I didn’t needed them)
- Using the auto-generated code using VS2005 WSDL on the services I’m using.
- C#
The problem is that what you’re trying to do is a bit involved. It’s got more to do with the oAuth process itself than the AdWords API implementation. I think that this is a case where it would be very beneficial to use the client library.
You actually need to use your token and consumer key to sign the request. This can either be done using RSA-SHA1 or RSA-HMAC; in the first instance you sign it with a private key file and upload the public key to Google; for RSA-HMAC you just use the token and consumer secrets instead of the public/private key.
You can find out more about doing this here, but I would recommend just using Google’s implementation unless you’re interested in the internals of oAuth. I tried it myself a while ago and found it quite complicated.