0

So my vendor has this event for me to call, members like ContactKey, EventDefinitionKey and Data.

But I cannot find anywhere a class suffice this, not in sample project not in documents. Only an internal class called "ContactEvent" looks similar but not accessible from outside.

Kindly please help.

Details:

POST /interaction/v1/events | Fires the entry event that initiates the journey.

JSON Parameters ContactKey EventDefinitionKey Data

1 Answer 1

0

so far established a work around by using RESTful calls, using ETClient's authToken in header, something like following. but this won't be optimal, for one thing if we put this in an API service, the overhead to create new ETClient for every incoming request is not ideal, need to have some check logic of token expiration associated with refresh calls.........

        ETClient eTClient = new ETClient();
        using (var client = new HttpClient())
        {
            var request_json = System.IO.File.ReadAllText(@"C:\temp\RequestBody.txt");


            var url = "https://xxxxxxxxxx.rest.marketingcloudapis.com/interaction/v1/events";
            client.DefaultRequestHeaders.Add("Authorization", "Bearer " + eTClient.AuthToken);
            var content = new StringContent(request_json, Encoding.UTF8, "application/json");                    
            
            var response = client.PostAsync(url, content);
            System.Console.WriteLine(response.Result);                   
            
        }   

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .