User Permissions and Properties
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.
Global Property Token#
Node.js#
Copied to your clipboard1const CONFIG = {2 client: "acmeclient",3 organizationId: "1234567890@AdobeOrg",4 propertyToken: "8c4630b1-16db-e2fc-3391-8b3d81436cfb"5};67const targetClient = TargetClient.create(CONFIG);89targetClient.getOffers({...})
Java#
Copied to your clipboard1ClientConfig clientConfig = ClientConfig.builder()2 .client("emeaprod4")3 .organizationId("0DD934B85278256B0A490D44@AdobeOrg")4 .defaultPropertyToken("8c4630b1-16db-e2fc-3391-8b3d81436cfb")5 .build();67TargetClient targetClient = TargetClient.create(clientConfig);
Incidental Property Token in getOffers call#
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.
Node.js#
Copied to your clipboard1const CONFIG = {2 client: "acmeclient",3 organizationId: "1234567890@AdobeOrg",4};56const targetClient = TargetClient.create(CONFIG);78targetClient.getOffers({9 request: {10 execute: {11 pageLoad: {}12 },13 property: {14 token: "8c4630b1-16db-e2fc-3391-8b3d81436cfb"15 }16 }17})
Java#
Copied to your clipboard1ExecuteRequest executeRequest = new ExecuteRequest()2 .mboxes(getMboxRequests(mbox));34TargetDeliveryRequest targetDeliveryRequest = TargetDeliveryRequest.builder()5 .context(getContext(request))6 .execute(executeRequest)7 .cookies(getTargetCookies(request.getCookies()))8 .property(new Property().token("8c4630b1-16db-e2fc-3391-8b3d81436cfb"))9 .build();1011TargetDeliveryResponse targetResponse = targetClient.getOffers(targetDeliveryRequest);