Uploading with Oauth
matthewpjw
Registered Users Posts: 6 Beginner grinner
I'm attempting to complete a file upload when using Oauth using C#, I've been following the basic structure of phpsmug's oauth upload algorithm, but am getting the following error returned:
{"stat":"fail","code":38,"message":"unsupported version"}
I'm calling to http://api.smugmug.com/<filename> (as phpsmug does) and adding an Authorization header with my oauth credentials and signature, my other headers are:
request.Headers.Add("X-Smug-Version", "1.2.2");
request.Headers.Add("X-Smug-ResponseType", "JSON");
request.Headers.Add("X-Smug-FileName", name);
Any ideas what version is unsupported or how to get uploads working with oAuth?
{"stat":"fail","code":38,"message":"unsupported version"}
I'm calling to http://api.smugmug.com/<filename> (as phpsmug does) and adding an Authorization header with my oauth credentials and signature, my other headers are:
request.Headers.Add("X-Smug-Version", "1.2.2");
request.Headers.Add("X-Smug-ResponseType", "JSON");
request.Headers.Add("X-Smug-FileName", name);
Any ideas what version is unsupported or how to get uploads working with oAuth?
0
Comments
what oauth_version are you sending in your upload request ? It must be something other than 1.0.
SmugMug API Developer
My Photos
Thanks, It seems I wasn't sending the version within double quotation marks, after a bit of packet dumping in wireshark it is now uploading successfully.
I'll go over the code over the next few days and should be able to put the C# library online somewhere, seems to support the core features using oauth now.
Cheers,
Matt