Welcome Developers!

in

Welcome!

in

Consumer key with OAuth .NET

Last post 01-25-2010 1:50 PM by Joel. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-19-2010 2:10 PM

    Consumer key with OAuth .NET

    Hello,
    here is my code :



    Dim normUrl As String = String.Empty Dim normParams As String = String.Empty Dim strRequest As String = String.Empty
    Dim sSignature As String = oAuth__1.GenerateSignature(New Uri("http://api.myspace.com/request_token"), "http://www.myspace.com/123456789", "secret", _ String.Empty, String.Empty, "GET", "1263937073", "325320", _ OAuth.OAuthBase.SignatureTypes.HMACSHA1, normUrl, normParams)



    My The base url I get is :

    GET&http%3A%2F%2Fapi.myspace.com%2Frequest_token&oauth_consumer_key%3Dhttp%3A%2F%2Fwww.myspace.com%2F123456789%26oauth_nonce%3D325320%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1263937073

    Whereas the Base Url from the Myspace OAuth toolkit (http://developer.myspace.com/Modules/APIs/Pages/OAuthTool.aspx) is :


    GET&http%3A%2F%2Fapi.myspace.com%2Frequest_token&oauth_consumer_key%3Dhttp%253A%252F%252Fwww.myspace.com%252F123456789%26oauth_nonce%3D325320%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1263937073


    We can see that the issue is with the oauth_consumer_key parameter.
    For me it's
    oauth_consumer_key%3Dhttp%3A%2F%2Fwww.myspace.com%2F123456789
    For them it's
    oauth_consumer_key%3Dhttp%253A%252F%252Fwww.myspace.com%252F123456789


    Why ? It seems to be url encoded...
    Please help.
  • 01-19-2010 5:52 PM In reply to

    Re: Consumer key with OAuth .NET

     Hello,

    Testing your string, it appears this element is double-encoded (it requires decoding 2x to get back to the normal http url format). What response are you getting for both GET requests?

     

    thanks,

    Joel

  • 01-21-2010 9:47 AM In reply to

    Re: Consumer key with OAuth .NET

    Which response are you talking about ? With url with the generated signature ? In my case, I get a 401 Error. With the signature generated by the TOOL, i get a valid token.
  • 01-21-2010 2:38 PM In reply to

    Re: Consumer key with OAuth .NET

     Better yet, please send a Fiddler session or capture of the failed request and the 401 response to developerrelation@myspace-inc.com and we will examine it.

     

    thanks,

    Joel

  • 01-21-2010 2:39 PM In reply to

    Re: Consumer key with OAuth .NET

     Sorry, that's developerrelations@myspace-inc.com.

  • 01-21-2010 7:14 PM In reply to

    Re: Consumer key with OAuth .NET

    The faild request is System.Net.WebException : {"Le serveur distant a retourné une erreur : (401) Non autorisé."} Because the signature I get is wrong. My question is, do you know a way yo generate the request_token url in .NET ? I don't find it. Even the OAuthBase.cs from GoogleCode (http://oauth.googlecode.com/svn/code/csharp/OAuthBase.cs).
  • 01-22-2010 2:53 PM In reply to

    Re: Consumer key with OAuth .NET

     Please send a capture (Fiddler or otherwise) to our email address so we can diagnose the issue. Most likely culprit is an internal issue we're working on now but I am not certain this is your issue.

     

    thanks,

    Joel

  • 01-23-2010 6:26 AM In reply to

    Re: Consumer key with OAuth .NET

    OK I sent you the Filddler capture. Regars
  • 01-25-2010 1:50 PM In reply to

    Re: Consumer key with OAuth .NET

     thanks,

    Joel

Page 1 of 1 (9 items)