File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
examples/BingAdsExamples/BingAdsConsoleApp Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1212 </appSettings >
1313 <userSettings >
1414 <BingAdsConsoleApp .Properties.Settings>
15- <setting name =" DeveloperToken" serializeAs =" String" >
16- <value >BBD37VB98</value >
17- </setting >
18- <setting name =" ClientId" serializeAs =" String" >
19- <value >4c0b021c-00c3-4508-838f-d3127e8167ff</value >
20- </setting >
2115 </BingAdsConsoleApp .Properties.Settings>
2216 </userSettings >
2317</configuration >
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ class Program
2828
2929 private static AuthorizationData _authorizationData ;
3030 private static string ClientState = "ClientStateGoesHere" ;
31+ private static string DevToken = "BBD37VB98" ;
32+ private static string ClientId = "4c0b021c-00c3-4508-838f-d3127e8167ff" ;
3133
3234 static void Main ( string [ ] args )
3335 {
@@ -114,7 +116,7 @@ private static Authentication AuthenticateWithOAuth()
114116 ConfigurationManager . AppSettings [ "BingAdsEnvironment" ] == ApiEnvironment . Sandbox . ToString ( ) ?
115117 ApiEnvironment . Sandbox : ApiEnvironment . Production ;
116118 var oAuthDesktopMobileAuthCodeGrant = new OAuthDesktopMobileAuthCodeGrant (
117- Settings . Default [ " ClientId" ] . ToString ( ) ,
119+ ClientId ,
118120 apiEnvironment
119121 ) ;
120122
@@ -244,7 +246,7 @@ private static async Task SetAuthorizationDataAsync(Authentication authenticatio
244246 _authorizationData = new AuthorizationData
245247 {
246248 Authentication = authentication ,
247- DeveloperToken = Settings . Default [ "DeveloperToken" ] . ToString ( )
249+ DeveloperToken = DevToken
248250 } ;
249251
250252 ApiEnvironment environment = ( ( OAuthDesktopMobileAuthCodeGrant ) _authorizationData . Authentication ) . Environment ;
You can’t perform that action at this time.
0 commit comments