# IPAddress from React book component only works w/ "on your network"

**URL:** <https://forum.kirupa.com/t/ipaddress-from-react-book-component-only-works-w-on-your-network/639505>\
**Category:** web dev\
**Created:** [March 15, 2019, 2:31am UTC](https://forum.kirupa.com/t/ipaddress-from-react-book-component-only-works-w-on-your-network/639505 "2019-03-15T02:31:58Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [June 26, 2019, 4:52pm UTC](https://forum.kirupa.com/t/ipaddress-from-react-book-component-only-works-w-on-your-network/639505/15 "2019-06-26T16:52:03Z")

</div>

Hi everyone - I just posted a workaround here: [Chapter 14 too many requests error](http://forum.kirupa.com/t/chapter-14-too-many-requests-error/639460/4)

In short, you can sign-up for a free account at [ipinfo.io](http://ipinfo.io) and use the token as part of making the request. The other option is to just use my free token instead: [https://ipinfo.io/json?token=2277ce4bac0347](https://ipinfo.io/json?token=2277ce4bac0347)

```
  componentDidMount() {
    xhr = new XMLHttpRequest();
    xhr.open("GET", "ipinfo.io/json?token=2277ce4bac0347", true);
    xhr.send();
 
    xhr.addEventListener("readystatechange", this.processRequest, false);
  }

```

The only risk with using my token is that there is a slight chance that many of you might be using it daily and that the request limit might get reached 🙂

---

_[View the full topic](https://forum.kirupa.com/t/ipaddress-from-react-book-component-only-works-w-on-your-network/639505)._
