Refresh Token Azure Problem

78 views
Skip to first unread message

Eray Bakır

unread,
Apr 21, 2022, 4:33:18 AM4/21/22
to Google Ads API and AdWords API Forum
  UserCredential credential;
      using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
      {
        credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
            GoogleClientSecrets.Load(stream).Secrets,
            // This OAuth 2.0 access scope allows for full read/write access to the
            // authenticated user's account.
            new[] { YouTubeService.Scope.Youtube },
            "user",
            CancellationToken.None,
            new FileDataStore(this.GetType().ToString())
        );
      }

Using the code I shared above, I can renew the duration of the refresh token and create a campaign through Google Ads SDK (for Net 5 application) without any problems, but when I launch the same application in Azure Containers, I get a "Token Expire" error.

I will be very happy if you can help me with this behavior difference. Thank you in advance.

Kind regards

Google Ads API Forum Advisor

unread,
Apr 21, 2022, 12:15:17 PM4/21/22
to crazy...@gmail.com, adwor...@googlegroups.com
Hi Eray,

Thank you for raising this concern to the Google Ads Forum.

With regard to your concern, I am afraid that we are not familiar with the Azure Containers. With this, could you please provide more details about Azure Containers? Is it the third party tool where you want to integrate the Google Ads API? If yes, I would suggest reaching out to the support team of this third party tool as they should be more equipped here because they are the one that can access its implementation.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2a5OiS:ref
Reply all
Reply to author
Forward
0 new messages