Recent Flickr HTTPS change - cannot authenticate connection

Topics: Developer Forum
Jul 15, 2014 at 10:20 AM
Hi,

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 11:00 AM
The error message states authentication failed:
<div id="wt-header">WebTitan: Access Denied</div> <div id="wt-url">https://api.flickr.com/*</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
StackTrace:
   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
   HResult=-2146233079
   Message=The remote server returned an error: (407) Proxy Authentication Required.
   Source=System
   StackTrace:
        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)
   InnerException: 
Coordinator
Jul 15, 2014 at 3:08 PM
Seems pretty obvious that you need to configure your proxy settings. Try adding the system.net/defaultProxy to your web.config.

http://msdn.microsoft.com/en-us/library/kd3cf2ex(v=vs.100).aspx

Sam
Jul 15, 2014 at 3: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.