Bing Ads ConsoleApp未保存刷新令牌 - Bing Ads .NET SDK [英] Bing Ads ConsoleApp not saving refresh token - Bing Ads .NET SDK
问题描述
您好,我是
我使用BingAdsConsoleApp v11(.NET C#)和oauth示例。 这些示例都有效,但我注意到刷新令牌没有像预期的那样保存在配置文件中。 因此,它一直要求我通过浏览器身份验证获得一个新的刷新令牌
。
Hello,
I have using the BingAdsConsoleApp v11 (.NET C#) with oauth example. The examples all work but I noticed that the refresh token isn't getting saved in the config file like it is supposed to. Therefore, it keeps asking me to get a new refresh token
via the browser authentication.
这行代码应该将刷新令牌保存到配置文件中:
This line of code should be saving the refresh token to the config file:
oAuthDesktopMobileAuthCodeGrant.NewOAuthTokensReceived +=
(sender, tokens) => SaveRefreshToken(tokens.NewRefreshToken);
我的最终目标是每周安排我的控制台应用程序,以便自动提取一些Bing Ads报告。  ;如何确保保存刷新令牌?
My ultimate goal is to schedule my console application weekly so it is pulling some Bing Ads reports automatically. How do I insure the refresh token is saved?
推荐答案
您需要更新示例以将刷新令牌保存在其他地方(某处)安全)。您可以编辑"SaveRefreshToken"功能或写一个新的。我们将更新样本以澄清。
You'll need to update the sample to save the refresh token elsewhere (somewhere secure). You can edit the "SaveRefreshToken" function or write a new one. We will update the sample to clarify.
谢谢,
Eric
这篇关于Bing Ads ConsoleApp未保存刷新令牌 - Bing Ads .NET SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!