Skip to content

Instantly share code, notes, and snippets.

<table border="1">
<tr>
<th>Ordinal</th>
<th>SendID</th>
<th>SubscriberKey</th>
<th>Eventhate</th>
<th>EventType</th>
<th>TriggeredSendDefinitionObjectID</th>
<th>BatchID</th>
<th>ClientID</th>
{
"ip": "111.100.64.10",
"location": {
"country": "JP",
"region": "Saitama",
"city": "Saitama",
"lat": 35.867,
"lng": 139.65,
"postalCode": "337-0042",
"timezone": "+09:00",
<script type="javascript" runat="server">
Platform.Load("core","1");
var ip = Platform.Request.ClientIP();
var apiKey = '' //insert apiKey obtained from https://geo.ipify.org/subscriptions
var url = 'https://geo.ipify.org/api/v1?apiKey=';
var response = HTTP.Get(url + apiKey + ip);
Write("response.Status: " + response.Status + '<br />');
Write("response.Content: " + response.Content);
<script type="javascript" runat="server">
Platform.Load("core","1");
var ip = Platform.Request.ClientIP();
Write("Your IP: " + ip);
</script>
Your IP: %%=HTTPRequestHeader("X-Forwarded-For")=%%
<script runat="server">
Platform.Load("Core","1");
var prox = new Script.Util.WSProxy();
var cols = [
"SendID",
"SubscriberKey",
"EventDate",
"EventType",
"TriggeredSendDefinitionObjectID",
"BatchID",
<script runat="server">
Platform.Load("Core","1");
var prox = new Script.Util.WSProxy();
var cols = [
"SendID",
"SubscriberKey",
"EventDate",
"EventType",
"TriggeredSendDefinitionObjectID",
"BatchID",
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">Retrieve</a:Action>
<a:ReplyTo>
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">https://{{your endpoint}}.soap.marketingcloudapis.com/Service.asmx</a:To>
<fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
</s:Header>
{
"Status":"OK",
"RequestID":"abcd1234",
"Results":[
{
"SubscriberFailures":[
],
"NewID":0,
"NewObjectID":null,
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<fueloauth>YOUR_ACCESS_TOKEN</fueloauth>
</Header>
<Body>
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="TriggeredSend">
<PartnerKey xsi:nil="true"/>
<ObjectID xsi:nil="true"/>
<TriggeredSendDefinition>