The Target SDKs include support for user permissions and properties. If you are unfamiliar with how Adobe Target handles enterprise permissions via workspaces and properties, you can read more about it in Enterprise user permissions.
The client can make use of a property token in one of two ways.
const CONFIG = {
client: "acmeclient",
organizationId: "1234567890@AdobeOrg",
propertyToken: "8c4630b1-16db-e2fc-3391-8b3d81436cfb"
};
const targetClient = TargetClient.create(CONFIG);
targetClient.getOffers({...})
ClientConfig clientConfig = ClientConfig.builder()
.client("emeaprod4")
.organizationId("0DD934B85278256B0A490D44@AdobeOrg")
.defaultPropertyToken("8c4630b1-16db-e2fc-3391-8b3d81436cfb")
.build();
TargetClient targetClient = TargetClient.create(clientConfig);
A property token can also be specified in an individual getOffers
call. This is done by adding a property object to the request. A property token specified in this way takes precedent over one set in the config.
const CONFIG = {
client: "acmeclient",
organizationId: "1234567890@AdobeOrg",
};
const targetClient = TargetClient.create(CONFIG);
targetClient.getOffers({
request: {
execute: {
pageLoad: {}
},
property: {
token: "8c4630b1-16db-e2fc-3391-8b3d81436cfb"
}
}
})
ExecuteRequest executeRequest = new ExecuteRequest()
.mboxes(getMboxRequests(mbox));
TargetDeliveryRequest targetDeliveryRequest = TargetDeliveryRequest.builder()
.context(getContext(request))
.execute(executeRequest)
.cookies(getTargetCookies(request.getCookies()))
.property(new Property().token("8c4630b1-16db-e2fc-3391-8b3d81436cfb"))
.build();
TargetDeliveryResponse targetResponse = targetClient.getOffers(targetDeliveryRequest);