• Resolved cadfile

    (@cadfile)


    Tried to add a new location to Events Manager but the search address button did nothing. Looked at my browser console and found a 401 error when using the API to OpenCage to get the coordinates.

    https://api.opencagedata.com/geocode/v1/json?key=*******Hidden for priavcy****&q=111%20Ottawa%20Street%2C%20Toledo%2C%2043604%2C%20OH&no_annotations=1&add_request=1&pretty=1&language=en

    I went to the OpenCage website and it might be that they limit the api calling it a Free Trial so it might expire at some point.

    This only effects attempts to add a location. Previous maps work fine

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    The browser console should show the OpenCage result or their error response.

    A 401 server response is usually “not found”, meaning the requested URL could not be found.

    What is the full response in your browser console window?

    Thread Starter cadfile

    (@cadfile)

    Here is the full response code from the console:

    {
       "documentation" : "https://opencagedata.com/api",
       "licenses" : [
          {
             "name" : "see attribution guide",
             "url" : "https://opencagedata.com/credits"
          }
       ],
       "request" : {
          "abbrv" : 0,
          "add_request" : "1",
          "format" : "json",
          "key" : "a97c8904a1ea47e889678b3ac4e13937",
          "language" : "en",
          "limit" : 10,
          "min_confidence" : 0,
          "no_annotations" : "1",
          "no_dedupe" : 0,
          "no_record" : 0,
          "pretty" : 1,
          "proximity" : "",
          "query" : "",
          "roadinfo" : 0,
          "version" : "v1"
       },
       "results" : [],
       "status" : {
          "code" : 401,
          "message" : "unknown API key"
       },
       "stay_informed" : {
          "blog" : "https://blog.opencagedata.com",
          "twitter" : "https://twitter.com/OpenCage"
       },
       "thanks" : "For using an OpenCage API",
       "timestamp" : {
          "created_http" : "Wed, 08 Jun 2022 01:27:30 GMT",
          "created_unix" : 1654651650
       },
       "total_results" : 0
    }
    
    Thread Starter cadfile

    (@cadfile)

    The response unknown api key so I got a new key and it worked fine. I didn’t exceed the calls per day so not sure why the key stopped working

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting 401 error when searching’ is closed to new replies.