• Resolved danishjk

    (@danishjk)


    I have 401 API error with owm Weather, the Api key is fine and works properly as reported by openweathermap team
    I have generated three to four keys and same problem occur again and again.
    Kindly assist me what i should to do next.
    Thanking you

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Uwe Jacobs

    (@uwejacobs)

    Do you have a website where I could look at the issue? Does OWM Weather work when you leave the API key setting empty?

    Thread Starter danishjk

    (@danishjk)

    Yes, I have a website, namely kashmirweather.com .
    For checking all published Weather, I have embedded some shortcodes on this page.
    https://kashmirweather.com/weather-forecast/
    You can see the issue on above given link.

    Thread Starter danishjk

    (@danishjk)

    When I leave the Api key setting empty, same problem occur with all published Weather pages, except one page.

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I see the issue. That is really odd.

    Could you select the ‘Debug’ template under the “Layout” tab for one of the custom weather posts? Maybe that helps to get to the bottom of it.

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I also noticed that you have both WP Cloudy and OWM Weather installed. OWM Weather is a continuation of WP Cloudy. The WP Cloudy plugin download has been blocked by WordPress because of security issues.

    It should theoretically be possible to have both active at the same time. Just for a quick test, could you disable WP Cloudy and try the test webpage just with OWM Weather turned on?

    • This reply was modified 1 year, 7 months ago by Uwe Jacobs.
    Thread Starter danishjk

    (@danishjk)

    Yes, now i have disabled the wp cloudy plugin. I installed it only after seeing error in owm Weather.
    I have disabled it for some time please review again the website.
    Thanking you

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    I see WP Cloudy is now disabled but it didn’t make any difference.

    Could you select the ‘Debug’ template under the ‘Layout’ tab for one of the custom weather posts (466, 464, 620, 446, 394, or 442)? Maybe that helps to get to the bottom of it.

    Thread Starter danishjk

    (@danishjk)

    Same api keys working fine in wp cloudy,and when i disable wp cloudy & insert the keys in owm Weather it shows 401 error. How this error can be fixed

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Could you select the ‘Debug’ template under the ‘Layout’ tab for one of the custom weather posts (466, 464, 620, 446, 394, or 442)? Then I take a look at the internals and maybe that helps to get to the bottom of it.

    Thread Starter danishjk

    (@danishjk)

    I have made same template settings ( Debug) for three custom posts.
    Here are the shortcodes
    [owm-weather id=”620″/]
    [owm-weather id=”464″/]
    [owm-weather id=”466″/]

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Thanks for making the changes. Unfortunately, that didn’t help since the error prevented the output of the debug template.

    I posted a new version of the plugin that will display the generated OWM API URL after the error message. This should show which of the 3 API calls fails and why. Please update to version 5.6.7 and I will take another look at your website.

    Thread Starter danishjk

    (@danishjk)

    I have updated the plugin, please review again the site.
    Thanking you

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    OWM Weather uses 3 OpenWeatherMap APIs to collect the data:

    Weather 2.5 (current weather)
    Forecast 2.5 (5 day / 3 hour forecast)
    One Call 2.5 (Hourly forecast for 48 hours / Daily forecast for 8 days)

    The recently updated OpenWeatherMap pricing list shows that Weather 2.5 and Forecast 2.5 are still part of the free plan. The latest One Call 3.0 is now “pay as you call”. I spoke to OpenWeatherMap support a while back and they ensured me that version 2.5 will stay free forever. This doesn’t seem to be the case since your API key is rejected. When I take your url from the error message and swap the key with mine, it works. That means older keys have different permissions than newly created keys.

    I am going to contact OpenWeatherMap support to get to the bottom of it.

    Thread Starter danishjk

    (@danishjk)

    Sir, what i should to do next ?

    Plugin Author Uwe Jacobs

    (@uwejacobs)

    Your only option at this point is to use the shared built-in key. Empty the API key field in the settings and then deactivate/activate the plugin to completely clear the caches. Just keep in mind, this key is shared with everyone else who didn’t sign up for their own key.

    Once I get a reply from OpenWeatherMap support I let you know.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘401 Api error in owm Weather’ is closed to new replies.