## HumanConnect.open argument properties

Before invoking the function `HumanConnect.open(options)` to launch Connect, you can supply the following parameters for the options object argument:

clientIdYour application's `clientId`. If you don't have one, please reach out to open a developer account
clientUserIdCan be an email address or any UTF-8 string to identify the user
token(**required**) Session token initially retrieved from Human API's authentication service
onCloseA Javascript function with this signature: `function close(response){...}`
onConnectSourceA Javascript function with this signature: `function (response){...}`
onDisconnectSourceA Javascript function with this signature: `function (response){...}`

## Human Connect session response during user activity

After the user adds or removes data sources and closes Connect, your `onClose` callback will be invoked with a response argument. The response object is as follows:

statusStringIdentifies whether the session terminated normally (`SUCCESS`) or abnormally : `SESSION_TOKEN_INVALID`, `SESSION_TOKEN_EXPIRED` or `MISSING_SESSION_TOKEN`
sessionResultsObjectIdentifies details about the data sources which the user connected or disconnected
sessionResults.connectedSourcesArray[Object]Identifies data sources connected by the user during the session. The array can be empty if the user did not connect any source
sessionResults.disconnectedSourcesArray[Object]Identifies data sources disconnected by the user during the session. The array can be empty if the user did not disconnect any source
currentConnectionsArray[Object]Identifies active data sources for the user, including sources which were connected in previous sessions

See below for an example response:

Does the response payload look different for onConnectSource and onDisconnectSource?

The main difference lies in the "response.status". When onConnectSource is invoked, "response.status"="CONNECTED_SOURCE". When onDisconnectSource is invoked, "response.status"="DISCONNECTED_SOURCE".