Loading ...
Sorry, an error occurred while loading the content.

Re: [ysearchboss] Boss API Placefinder returns 401 (unauthorized)

Expand Messages
  • Rahul Hampole
    A BOSS developer once pointed out to http://vimeo.com/forums/topic:18680 as an issue with the VB.NET oAuth library. Your code looks fine so I think it has to
    Message 1 of 2 , Apr 11, 2013
    • 0 Attachment
      A BOSS developer once pointed out to http://vimeo.com/forums/topic:18680 as an issue with the VB.NET oAuth library. 

      Your code looks fine so I think it has to be one of the following

      1. It is an incorrect key being used – Feel free to open up a support ticket and we can check it out for you
      2. oAuth library issues – See solution posted at vimeo.com
      One alternate approach is to use a different code base (C# or PHP) and test it out quickly to focus on whether it is a code issue or a key issue. 
      Best
      BOSS Team


      From: masterofpuppets117 <masterofpuppets117@...>
      Reply-To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
      Date: Thursday, April 11, 2013 8:41 AM
      To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
      Subject: [ysearchboss] Boss API Placefinder returns 401 (unauthorized)

       

      Constantly return 401 unauthorized error. Header response says 'WWW-Authenticate: OAuth oauth_problem=signature_invalid' no matter what i do. Does placefinder need a token to work? http://developer.yahoo.com/oauth/guide/oauth-requesttoken.html

      Or can i just straight use this? http://developer.yahoo.com/boss/geo/docs/oauth_model_geo.html#d4e123

      both methods return invalid signature. VB.net code sample below.

      Dim consumerKey As String = "..."
      Dim consumerSecret As String = "..."
      Dim uri = New Uri("http://yboss.yahooapis.com/geo/placefinder?q=")
      Dim url As String, param As String
      Dim oAuth = New OAuthBase()
      Dim nonce = oAuth.GenerateNonce()
      Dim timeStamp = oAuth.GenerateTimeStamp()
      Dim signature = oAuth.GenerateSignature(uri, consumerKey, consumerSecret, string.Empty, string.Empty, "GET", _
      timeStamp, nonce, OAuthBase.SignatureTypes.HMACSHA1, url, param)
      Dim sendAddress = String.Format("{0}{1}&oauth_consumer_key={2}&oauth_nonce={3}&oauth_timestamp={4}&oauth_signature_method={5}&oauth_version=1.0&oauth_signature={6}" _
      , uri, addressStr, consumerKey, nonce, timeStamp, "HMAC-SHA1", signature)

    Your message has been successfully submitted and would be delivered to recipients shortly.