You need to sign in to do that
Don't have an account?
Admin DNA
get ip client for guest user in community
Hi, is there a way to get the ip address of the connected guest user?
I try the below code but it works for the logged user but returns null for the guest users:
I also try with a callout but it returns ip of salesforce server
I try the below code but it works for the logged user but returns null for the guest users:
@AuraEnabled public static String GetUserIPAddress() { string ReturnValue = Auth.SessionManagement.getCurrentSession().get('SourceIp');
I also try with a callout but it returns ip of salesforce server
Greetings to you!
You can use https://www.trackip.net/ip?json API to capture IP Address.
Please refer to the below links which might help you further with the above requirement.
https://developer.salesforce.com/forums/?id=9060G0000005Pc1QAE
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
Thank you