This project has moved and is read-only. For the latest updates, please go here.

Recent Flickr HTTPS change - cannot authenticate connection

Topics: Developer Forum
Jul 15, 2014 at 11:20 AM

The recent change to Flickr from http to https connections has affected our code. The previous developers were referencing the FlickrNet DLL (which we have updated to version 3.13) and had a method call:
Dim flickr As New Flickr("____________________") - This was the key
Dim sets As Photosets = flickr.PhotosetsGetList("______________") - user id i.e. number@N03
They then looped through the set to write the results to an XML file:
For Each [set] As FlickrNet.Photoset In sets.PhotosetCollection
However, these function calls are no longer relevant.

We tried changing the Photosets to a PhotosetCollection but when we call the PhotosetGetList function it doesn't authenticate.

Should we be setting the AuthToken in the Flickr instance and if so how do we get this token?
Jul 15, 2014 at 12:00 PM
The error message states authentication failed:
<div id="wt-header">WebTitan: Access Denied</div> <div id="wt-url">*</div> <div id="wt-custombody">The web page you are trying to access has been blocked by the WebTitan Web Filter. Access has been blocked because:</div> <div id="wt-reason">Authentication failed - username or password incorrect</div> Source=FlickrNet
   at FlickrNet.FlickrResponder.GetDataResponseOAuth(Flickr flickr, String baseUrl, Dictionary`2 parameters)
   at FlickrNet.FlickrResponder.GetDataResponse(Flickr flickr, String baseUrl, Dictionary`2 parameters)
   at FlickrNet.Flickr.GetResponse[T](Dictionary`2 parameters, TimeSpan cacheTimeout)
   at FlickrNet.Flickr.GetResponseCache[T](Dictionary`2 parameters)
   at FlickrNet.Flickr.PhotosetsGetList(String userId, Int32 page, Int32 perPage, PhotoSearchExtras primaryPhotoExtras)
   at FlickrNet.Flickr.PhotosetsGetList(String userId)
   at _Default.Page_Load(Object sender, EventArgs e) in ____________________________________
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Net.WebException
   Message=The remote server returned an error: (407) Proxy Authentication Required.
        at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
        at System.Net.WebClient.UploadString(Uri address, String method, String data)
        at System.Net.WebClient.UploadString(String address, String data)
        at FlickrNet.FlickrResponder.DownloadData(String method, String baseUrl, String data, String contentType, String authHeader)
        at FlickrNet.FlickrResponder.GetDataResponseOAuth(Flickr flickr, String baseUrl, Dictionary`2 parameters)
Jul 15, 2014 at 4:08 PM
Seems pretty obvious that you need to configure your proxy settings. Try adding the to your web.config.

Jul 15, 2014 at 4:33 PM
I never even thought of that - I assumed it was proxy authentication on Flickr's side. We use a proxy server on our PCs but not on the server. When I disabled the proxy it appeared to work - I will test later when I deploy to our live environment.

Thanks very much for the reply.