getVars

Gets the variable values for the current user or device. If the user/device does not exist, the API request is skipped and a warning will be returned. You can modify this behavior with the createDisposition option (see below). To see default variable values, use the includeDefaults parameter.

This method requires your production API clientKey.

Query Params
string
required
Defaults to YOUR_APP_ID

The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.

string
required
Defaults to YOUR_PROD_KEY

The Production key for your Leanplum App.

string
enum
required
Defaults to 1.0.6

The version of the Leanplum API to use. The current version is 1.0.6.

Allowed:
string
enum
Defaults to CreateNever

The policy that determines whether users are created by the API. Possible values:

  • CreateIfNeeded creates a user with the given IDs if one does not already exist.
  • CreateNever requires that the user already exists, otherwise the API action is skipped and a warning will be returned.

The default value for this method is CreateNever.

Allowed:
string
required

The current user ID. Required unless using device ID. You can set this to whatever you use at your company for user IDs. Leave it blank to use the device ID.

string

The device ID for which to retrieve the variables.

boolean
Defaults to false

Whether the user is in Development Mode, i.e. the user associated with the request is a developer and not a user. This is important for reporting purposes. Default: false.

boolean
Defaults to true

Whether to include default ('defaults in code') values in output. Default: true.

Response

Language
Credentials
URL
Response
Choose an example:
application/json