Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Access Denied Error with InvokeHTTP

avatar
Expert Contributor

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

avatar
Super Guru

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

avatar
Super Guru

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

avatar
Expert Contributor

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