admin管理员组

文章数量:1291061

My company has implemented the Google Ads API to send Google Ads Enhanced Conversions. The developer who created the C# .NET console application that performs this as a scheduled task is no longer with the company. We are now getting this error message:

"[09:36:22 INF] One or more errors occurred. (Status(StatusCode="Internal", Detail="Error starting gRPC call. TokenResponseException: Error:"invalid_grant", Description:"Account has been deleted", Uri:""", DebugException="Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"invalid_grant", Description:"Account has been deleted", Uri:""")) : 2/2/2025 9:36:22 AM"

I thought maybe the oauth credentials went away when the developer who created the app left the company, but In the Google Cloud console, under APIs & Services / OAuth consent screen, the application appears with the Client ID and client secret that are being used in the application config. So it seems like the OAuth authentication should still work. Would appreciate any feedback about what could be wrong.

My company has implemented the Google Ads API to send Google Ads Enhanced Conversions. The developer who created the C# .NET console application that performs this as a scheduled task is no longer with the company. We are now getting this error message:

"[09:36:22 INF] One or more errors occurred. (Status(StatusCode="Internal", Detail="Error starting gRPC call. TokenResponseException: Error:"invalid_grant", Description:"Account has been deleted", Uri:""", DebugException="Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"invalid_grant", Description:"Account has been deleted", Uri:""")) : 2/2/2025 9:36:22 AM"

I thought maybe the oauth credentials went away when the developer who created the app left the company, but In the Google Cloud console, under APIs & Services / OAuth consent screen, the application appears with the Client ID and client secret that are being used in the application config. So it seems like the OAuth authentication should still work. Would appreciate any feedback about what could be wrong.

Share Improve this question asked Feb 13 at 18:32 Scott BrownScott Brown 731 gold badge2 silver badges4 bronze badges 2
  • Was the Google account of the developer who is "no longer with the company" deleted? If so, your application is continuing to expect this user's credentials during the auth flow (acquisition of access tokens using the refresh token) which will fail. Short-term: you will need to reauthenticate the application using another user account. Long-term: you should probably (!?) not be using Client ID|Secret but should be using Service Accounts as credentials for a console (!) application. – DazWilkin Commented Feb 14 at 0:23
  • thanks... Since this is an "offline" application that runs in the background, it doesn't actually prompt for authorization while it's running. It turns out that what was needed was to generate a new Refresh Token using the OAuth Playground, per these instructions: developers.google/google-ads/api/docs/oauth/playground – Scott Brown Commented Feb 15 at 12:19
Add a comment  | 

1 Answer 1

Reset to default 0

It turns out that what was needed was to generate a new Refresh Token using the OAuth Playground, per these instructions: developers.google/google-ads/api/docs/oauth/playground

本文标签: