Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Access Denied Error with InvokeHTTP

Rising Star

I am using NiFi v.1.16.1

 

When I attempt to retrieve the weather data from the below URL, I don't get any response unless I specify "Always Output Response", and then I get an Access Denied response.  However, these are free data feeds that  work just fine using any other client,

e.g. curl https://w1.weather.gov/xml/current_obs/KSFO.xml

 

Anyone have any ideas what may be going on here?  

1 ACCEPTED SOLUTION

Super Collaborator

Hi,

After some research I found in order to avoid getting the 403 error, you need to provide the User-Agent to the header as explained by the FAQ under the same domain (scroll below until you find 403 error):

https://weather-gov.github.io/api/general-faqs

To solve your problem you need to set the UserAgent Property on the invokeHttp processor. It can be something like: nifi/version 1.16.0

Hope that helps, if it does please accept solution.

Thanks

View solution in original post

2 REPLIES 2

Super Collaborator

Hi,

After some research I found in order to avoid getting the 403 error, you need to provide the User-Agent to the header as explained by the FAQ under the same domain (scroll below until you find 403 error):

https://weather-gov.github.io/api/general-faqs

To solve your problem you need to set the UserAgent Property on the invokeHttp processor. It can be something like: nifi/version 1.16.0

Hope that helps, if it does please accept solution.

Thanks

Rising Star

Yep!  That is absolutely correct.  Thanks for that.  I spent more time trying to resolve this than I care to admit, because of my bias.  Thanks for this @SAMSAL 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.