Skip to content

Instantly share code, notes, and snippets.

@jasonwaters
Last active June 9, 2020 00:31
Show Gist options
  • Save jasonwaters/9a408ac65717c272efbce12d43d62c4d to your computer and use it in GitHub Desktop.
Save jasonwaters/9a408ac65717c272efbce12d43d62c4d to your computer and use it in GitHub Desktop.
This is an example of how to specify an ipAddress when making a getOffers method call. Simply add it to the geo object of the request context.
const TargetClient = require("@adobe/target-nodejs-sdk");
const client = TargetClient.create({
client: "adobesummit2018",
organizationId: "65453EA95A70434F0A495D34@AdobeOrg"
});
client
.getOffers({
request: {
context: {
channel: "web",
geo: {
ipAddress: "79.14.121.7"
}
},
execute: {
mboxes: [{ name: "demo-marketing-offer1" }]
}
}
})
.then(result => {
console.log(result);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment