Set User Attributes
When using Appmate APIs, you can set the user information you want to the header. You can save your user private information in the appmate database for processing. This api allows you to save for example :user's phone number, nickname, age, gender, a second email address ...
You can create the properties you want to save in the form of key,value pairs. It does not allow adding two of the same parameter, the value of the relevant parameter is set.
#
RequestParameter Name | Type |
---|---|
userAttributes | Map<String, String> |
#
ResponseParameter Name | Type |
---|---|
result | String |
- Kotlin
- Java
Map<String, String> userAttributes = new HashMap<>();userAttributes.put("PhoneNumber", "0542890****");userAttributes.put("Email", "test@test.com");userAttributes.put("UserName", "Test User");
String result = PurchaseClient.getInstance().setUserAttributes(userAttributes);
val userAttributes: MutableMap<String, String> = mutableMapOf<String, String>()userAttributes.put("PhoneNumber", "0542890****")userAttributes.put("Email", "test@test.com")userAttributes.put("UserName", "Test User")
val result: String = PurchaseClient.instance.setUserAttributes(userAttributes)