How to create User via API method with certain User's Country parameter?
complete
N
Nazar Voitovych
Our case:
User can sign up via Web page -- it's implemented via Adapty API (https://docs.adapty.io/docs/server-side-api-specs#create-a-user) used on our backend.
Problem:
Users created via Adapty API from backend server are signed up with 'USA' Country, which has significant impact on our analytics.
Possible solution:
As we understand, reason of such behaviour is - Adapty API uses server's IP (USA origin) which make request to create user to set User's Country.
Is it possible to allow set user IP/Country in Adapty API Create User method as an optional parameter?
Adapty Support
complete
N
Nazar Voitovych
Hi there,
There is no such properties in provided method documentation.
In any case, I have found a solution:
Profile has undocumented attributes, especially 'ip_country', so tried to use Update Profile API method by passing user real IP address, not country name, (https://docs.adapty.io/docs/server-side-api-specs#set-the-users-attribute) and it worked out.
(I have retrieved user profile full object from Adapty's Console webpage using Browser Developer Console and find out that there more Profile attributes, I hope it's ok to use a such method 😅)
The same works with Create User method (https://docs.adapty.io/docs/server-side-api-specs#create-a-user)
Suggestion:
Update documentation by adding all of the available Profile properties to set up there.
The question can be marked as 'solved'.
Thanks for your help!
A
Adapty Support
Hi there,
As a heads up, in this case, you may want to additionally set user attributes, as described here:
A
Adapty Support
Hey Nazar,
This is Ivan here. I've brought this discussions to the devs. We'll follow up on this one shortly