SDK lifecycle
Change Profile API Key dynamically
This method changes a Profile (formerly Client) API key dynamically.
Method name:
Client.changeApiKey(newApiKey)
Declaration:
public static void changeApiKey(@NonNull String newApiKey)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
newApiKey | String | yes | - | New API Key |
Return Value:
Void type method.
Example:
Client.changeApiKey(apiKey);
Change Profile API Key dynamically with config
This method changes a Profile (formerly Client) API key dynamically, with additional parameters. It can include a salt for Simple Authentication requests.
Method name:
Client.changeApiKey(apiKey, initializationConfig)
Declaration:
public static void changeApiKey(String apiKey, InitializationConfig initializationConfig)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiKey | String | yes | - | New API Key |
initializationConfig | InitializationConfig | no | - | Object for additional initialization settings after the API key change |
Return Value:
Void type method.
Example:
Client.changeApiKey(apiKey, initializationConfig);