For those who needs this later, you can set up http proxy and send a simple get request to https://api.ipify.org , it will give you the ip adress in plain text, no need to parse the json.
One of many simple and easy ways to do it.
I am using fingerprint. I'm load to "pinterest "with iphone. but sometimes it happens that it displays the desktop site instead of opening the mobile site. this makes it silly. How can I get it back to responsive design in such a situation.