# \#javascript

**URL:** https://community.ipinfo.io/tag/javascript/4.md

[Latest](https://community.ipinfo.io/latest.md) · [Categories](https://community.ipinfo.io/categories.md) · [Tags](https://community.ipinfo.io/tags.md)

---

## [Getting the country code of an IP addressing using IPinfo and jQuery](https://community.ipinfo.io/t/getting-the-country-code-of-an-ip-addressing-using-ipinfo-and-jquery/44)

<div class="topic-metadata">

**Author:** [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Replies:** 0\
**Last updated:** [March 27, 2023, 11:46am UTC](https://community.ipinfo.io/t/getting-the-country-code-of-an-ip-addressing-using-ipinfo-and-jquery/44 "2023-03-27T11:46:03Z")

</div>

Making an API call and extracting the Country Code You can make an API request to IPinfo.io and extract the country value (E.G - US) from the response payload like so: jQuery.ajax({ // remember to add the Token …

---

## [Securing your IPinfo token on the frontend](https://community.ipinfo.io/t/securing-your-ipinfo-token-on-the-frontend/35)

<div class="topic-metadata">

**Author:** [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Replies:** 0\
**Last updated:** [March 27, 2023, 7:52am UTC](https://community.ipinfo.io/t/securing-your-ipinfo-token-on-the-frontend/35 "2023-03-27T07:52:16Z")

</div>

We recommend users put their IPinfo token in their backend or server-side because of security reasons, but for many instances, you might need to make the IPinfo API call from the frontend such as — web personalization, l…
