admin管理员组

文章数量:1123646

I'm trying to use the MaxMind API to retrieve the country information for an IP address in PrestaShop. However, the response consistently fails with a 401 error. I used Insomnia for debugging but encountered the same issue. I’ve tried multiple scenarios, but I always receive a 401 response.

I even created a new license key, but the issue persists.

Here is my request :

curl --request GET \
  --url .1/country/207.254.0.0 \
  --header 'Authorization: Basic ****' \
  --header 'Content-Type: application/vnd.maxmind-country+json; charset=UTF-8; version=2.1'

and the response :

{
    "code": "AUTHORIZATION_INVALID",
    "error": "Your account ID or license key could not be authenticated."
}

I'm missing something, but I don't know what...

本文标签: curlMaxmind API request 401Stack Overflow