Adobe Campaign JavaScript SDK

Connection Parameters

Connection parameters can also be passed an option object when creating a client

const connectionParameters = sdk.ConnectionParameters.ofUserAndPassword(
    "https://myInstance.campaign.adobe.com", 
    "admin", "admin",
    { representation: "xml", rememberMe: true });

This table shows the various available properties and their values

Property Default Description
representation "SimpleJson" See below. Will determine if the SDK works with xml of json object. Default is JSON
rememberMe false The Campaign `rememberMe` attribute which can be used to extend the lifetime of session tokens
entityCacheTTL 300000 The TTL (in milliseconds) for the xtk entity cache
methodCacheTTL 300000 The TTL (in milliseconds) for the xtk method cache
optionCacheTTL 300000 The TTL (in milliseconds) for the xtk option cache
traceAPICalls false Activates tracing of API calls or not
transport axios Overrides the transport layer
noStorage false De-activate using of local storage
storage localStorage Overrides the local storage for caches
refreshClient undefined Async callback to run when the session token is expired
charset UTF-8 The charset encoding used for http requests. In version 1.1.1 and above, the default will be UTF-8. It's possible to override (including setting an empty character set) with this option.
extraHttpHeaders [string]:string An optional dictionary (key/value pairs) of extra HTTP headers to pass to all API calls.
clientApp string An optional string describing the name and version of the SDK client application. It will be passed to the server in the ACC-SDK-Client-App HTTP header
noSDKHeaders boolean Can be set to disable passing ACC-SDK-* HTTP headers to the server
noMethodInURL boolean Can be set to true to remove the method name from the URL
timeout number Can be used to set the APIs call timeout (in ms)