This add-on is operated by IDB LLC
Fast & accurate IP geolocation data with simple and robust API access.
Last updated September 02, 2021
The IPinfo add-on is currently in beta.
Table of Contents
IPinfo is an add-on that provides IP geolocation.
Adding IPinfo to an application provides you fast and accurate information about IP addresses. Information related to IP addresses’ company, mobile carrier, vpn and more are also available.
IPinfo is accessible via an API and has supported client libraries for Java, Ruby, Python, C#, Node.js, PHP, Go, Rust Erlang and more.
Provisioning the Add-on
Attach IPinfo to a Heroku application via the CLI:
$ heroku addons:create ipinfo Creating ipinfo on sharp-mountain-4005... free Your add-on has been provisioned successfully
After you provision IPinfo, the
IPINFO_TOKEN config var is available in your app’s configuration. It contains your IPinfo token to make requests. You can view this token via the
heroku config:get command:
$ heroku config:get IPINFO_TOKEN cb159dd1128cs2
After you install IPinfo, your application is configured to fully integrate with the add-on. Open the dashboard for product onboarding.
After you provision the add-on, it’s necessary to locally replicate its config vars so your development environment can operate against the service.
Use the Heroku Local command-line tool to configure, run, and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a
.env file. To view all of your app’s config vars, type
heroku config. Use the following command for each value that you want to add to your
$ heroku config:get IPINFO_TOKEN -s >> .env
Don’t commit credentials and other sensitive configuration values to source-control. In Git exclude the
echo .env >> .gitignore.
For more information, see the Heroku Local article.
You can install IPinfo for use in a local development environment. Typically, this process entails making requests to IPInfo’s API endpoints or using any of the supported libraries. Use your IPinfo token, which is present in the environment variable
IPINFO_TOKEN. See the developer documentation for more info.
For more information on the features available within the IPInfo dashboard, please see the docs at ipinfo.io/account/home.
The IPinfo dashboard allows you to check your API usage and get results in the web interface.
You can access the dashboard via the CLI:
$ heroku addons:open IPinfo Opening IPinfo for sharp-mountain-4005
or by visiting the Heroku Dashboard and selecting the application in question. Select IPinfo from the Add-ons menu.
If the token doesn’t work, check that it’s set correctly in the environment.
Removing the add-on
You can remove IPinfo via the CLI:
This action destroys all associated data and can’t be undone!
$ heroku addons:destroy IPinfo -----> Removing IPinfo from sharp-mountain-4005... done, v20 (free)
Submit all IPinfo support and runtime issues via one of the Heroku Support channels.