I am using FuelSDK-CSharp to extract data from SFMC for that I am using the below Code
static void Main(string[] args)
{
try
{
// Initialize the ETClient
ETClient client = new ETClient();
// Retrieve Email Events
Console.WriteLine("Retrieving Email Events...");
RetrieveEmailEvents(client);
// Retrieve SMS Events
Console.WriteLine("Retrieving SMS Events...");
RetrieveSMSEvents(client);
// Retrieve WhatsApp Events
Console.WriteLine("Retrieving WhatsApp Events...");
RetrieveWhatsAppEvents(client);
}
catch (Exception ex)
{
throw ex;
}
}
Getting System.Net.WebException: ‘The remote server returned an error: (400) Bad Request.’ error when trying to Initialize the ETClient, below is the config I am using
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="fuelSDK" type="FuelSDK.FuelSDKConfigurationSection, FuelSDK" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
</startup>
<fuelSDK appSignature="none" clientId="abc" clientSecret="cdf"
authEndPoint="https://<subomain>.auth.marketingcloudapis.com/v1/requestToken"
restEndPoint="https://<subomain>.rest.marketingcloudapis.com/" />
</configuration>
Please point me in the right direction to solve the issue