maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

Access Maxmind API using User ID and License Key #119

Closed Vikram0811 closed 6 years ago

Vikram0811 commented 6 years ago

In order to authenticate with the City Webservice API, can we append the userid and license_key parameter to the API's base URL and set it to our access key value.

For example - https://geoip.maxmind.com/geoip/v2.1/city/{ip_address}?account_id=YourUserID&license_key=YourLicenseKey

The JSON response can be fetched and later utilized as per requirement

Thanks

oschwald commented 6 years ago

If you are not using this API, I would suggest contacting support@maxmind.com. However, for this particular question, you must use basic auth. You cannot pass the account ID and license key as params.

Vikram0811 commented 6 years ago

Hey,

I do not want to use the Client API but make API calls directly for city webservice. I do have maxmind account id and license key. How can I use basic auth for this?

Thanks