Hi,

If you are using default Google API for .NET (http://code.google.com/p/
google-api-adwords-dotnet/), that API expects that login values are
specified in the App.config XML file (provided App.config has empty
values).

However, if you want to specify values from code, you can change
AdWordsUser.requestHeader to be public (and not private).
Then you can use something like (C# code):

        RequestHeader requestHeader = new RequestHeader();

        requestHeader.authToken = new AuthToken("[email protected]",
                "password").GetToken();

        requestHeader.clientEmail = "[email protected]";
        requestHeader.developerToken = "[email protected]++usd";
        requestHeader.applicationToken = "ENTER_YOUR_APPLICATION_TOKEN_HERE";
        requestHeader.userAgent = "AWAPI DotNetLib from VB";

        AdWordsUser user = new AdWordsUser(); // By default, reads from
App.config.

        user.requestHeader = requestHeader;

        AdGroupCriterionService service = (AdGroupCriterionService)
user.GetService(ApiServices.v200906.AdGroupCriterionService);

Regards,

--
Zeljko
GemBox.Ppc - www.GemBoxSoftware.com/Ppc/Overview.htm - Advanced
AdWords API for C# / VB.NET


On Dec 16, 4:28 pm, Alexis ROUSSEAU <[email protected]> wrote:
> Hi,
>
> In V13 with VB.net I used this code to connect :
>
> Imports com.google.adwords
> (...)
> Private ServiceGoogle As New CampaignService
> (...)
>             ServiceGoogle = New email() {" "}
>             ServiceGoogle.emailValue.Text = New String() {" "}
>             ServiceGoogle.passwordValue = New password()
>             ServiceGoogle.passwordValue.Text = New String() {" "}
>             ServiceGoogle.useragentValue = New useragent()
>             ServiceGoogle.useragentValue.Text = New String() {" "}
>             ServiceGoogle.developerTokenValue = New developerToken()
>             ServiceGoogle.developerTokenValue.Text = New String() {"_ "}
>             ServiceGoogle.applicationTokenValue = New applicationToken()
>             ServiceGoogle.applicationTokenValue.Text = New String() {" "}
>             ServiceGoogle.clientEmailValue = New clientEmail
>             ServiceGoogle.clientEmailValue.Text = New String() {"t "}
>
> How can i do with v2009??
>
> Thanks for your help,
>
> Regards.
>
> --
> ROUSSEAU Alexis

--

You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" 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://groups.google.com/group/adwords-api?hl=en.


Reply via email to