Uploading with Oauth

matthewpjwmatthewpjw 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&gt; (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?

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 16, 2009
    matthewpjw wrote:
    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&gt; (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?

    what oauth_version are you sending in your upload request ? It must be something other than 1.0.
    David Parry
    SmugMug API Developer
    My Photos
  • matthewpjwmatthewpjw Registered Users Posts: 6 Beginner grinner
    edited April 16, 2009
    devbobo wrote:
    what oauth_version are you sending in your upload request ? It must be something other than 1.0.

    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
Sign In or Register to comment.