When I access the database endpoint using something like curl, it doesn’t seem to work and I get a corrupted/empty file..what am I doing wrong?

If you are using a library or program like curl to access our database endpoint, make sure that a redirect is enabled. For curl, that will be specifying the “-L” flag. 

### WITH REDIRECT ENABLED
$ curl -L https://ipinfo.io/data/location.csv.gz?token=$TOKEN -o location.csv.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   852  100   852    0     0    718      0  0:00:01  0:00:01 --:--:--   718
100  600M  100  600M    0     0  3532k      0  0:02:54  0:02:54 --:--:-- 3374k


### WITHOUT REDIRECT ENABLED
$ curl https://ipinfo.io/data/location.csv.gz?token=$TOKEN -o location.csv.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   852  100   852    0     0   1260      0 --:--:-- --:--:-- --:--:--  1260

Still need help? Contact Us Contact Us