After trying to send an event to Google Ads Api with this code:
UploadClickConversionsResponse response =
conversionUploadService.UploadClickConversions(
new UploadClickConversionsRequest()
{
CustomerId = customerId.ToString(),
Conversions = { clickConversion },
PartialFailure = true,
ValidateOnly = false
});
I got the message:
RpcException: Status(StatusCode="Unavailable", Detail="Getting metadata from plugin failed with error: Exception occurred in metadata credentials plugin. Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"invalid_request", Description:"Missing required parameter: refresh_token", ......
After that I've tried to request the token using ServiceAccountCredential wich returned "true" in this function:
credential.RequestAccessTokenAsync(CancellationToken.None).Result;
But still doesn't work.
Could anyone explain me how can I configure the refresh_token and send it with the UploadClickConversions?
I'm totally stuck. Thanks.