Skip to content

Commit

Permalink
add refresh_device_metadata to create user request
Browse files Browse the repository at this point in the history
When the server receives a create user request, it doesn't automatically update IP and country for this user because this request can come from the SDK or from the customer's server.
By passing in a `refresh_device_metadata = true` property to the request body, we can let the server know to update IP and country based on where the request originated from.
  • Loading branch information
nan-li authored and jinliu9508 committed Feb 6, 2024
1 parent 473ca90 commit 012330b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ internal class UserBackendService(
requestJSON.put("properties", JSONObject().putMap(properties))
}

requestJSON.put("refresh_device_metadata", true)

val response = _httpClient.post("apps/$appId/users", requestJSON)

if (!response.isSuccess) {
Expand Down

0 comments on commit 012330b

Please sign in to comment.