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

multiple word search gives signature_invalid

Expand Messages
  • m.bonfigli
    Hi, I just started using BOSS and ran into a problem. I m calling the service using java sample code found here
    Message 1 of 6 , Oct 24, 2013
      Hi,

      I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
      Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
      Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
      Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

      Thanks,
               m.
    • Rahul Hampole
      Hi M Are you encoding the spaces correctly to %20? Make sure it is encoded correctly as per
      Message 2 of 6 , Oct 24, 2013
        Hi M
        Are you encoding the spaces correctly to %20? 


        Thanks
        BOSS Team


        From: "m.bonfigli@..." <m.bonfigli@...>
        Reply-To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
        Date: Thursday, October 24, 2013 5:59 AM
        To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
        Subject: [ysearchboss] multiple word search gives signature_invalid

         

        Hi,

        I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
        Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
        Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
        Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

        Thanks,
                 m.

      • m.bonfigli
        Right. I encoded + sign and now it works fine, thanks. ... Hi M Are you encoding the spaces correctly to %20? Make sure it is encoded correctly as per
        Message 3 of 6 , Oct 25, 2013

          Right. I encoded + sign and now it works fine, thanks. 



          ---In ysearchboss@yahoogroups.com, <rhampole@...> wrote:

          Hi M
          Are you encoding the spaces correctly to %20? 


          Thanks
          BOSS Team


          From: "m.bonfigli@..." <m.bonfigli@...>
          Reply-To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
          Date: Thursday, October 24, 2013 5:59 AM
          To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
          Subject: [ysearchboss] multiple word search gives signature_invalid

           

          Hi,

          I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
          Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
          Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
          Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

          Thanks,
                   m.
        • m.bonfigli
          This was the problem: the code found in your docs reports: URLEncoder.encode(...) which is ok to translate a string into application/x-www-form-urlencoded
          Message 4 of 6 , Oct 25, 2013

            This was the problem:

            the code found in your docs reports:

            URLEncoder.encode(...)

            which is ok to translate a string into application/x-www-form-urlencoded format as per W3C specs. But that means the space becomes a '+' sign. While building the BOSS URL, it has to be replaced by a %2B .

            A line of code more and now it's ok.



            ---In ysearchboss@yahoogroups.com, <m.bonfigli@...> wrote:

            Right. I encoded + sign and now it works fine, thanks. 



            ---In ysearchboss@yahoogroups.com, <rhampole@...> wrote:

            Hi M
            Are you encoding the spaces correctly to %20? 


            Thanks
            BOSS Team


            From: "m.bonfigli@..." <m.bonfigli@...>
            Reply-To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
            Date: Thursday, October 24, 2013 5:59 AM
            To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
            Subject: [ysearchboss] multiple word search gives signature_invalid

             

            Hi,

            I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
            Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
            Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
            Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

            Thanks,
                     m.
          • Alain Désilets
            We had the same problem. We fixed it by surrounding each word with parents. So to search for hello world do q=(hello)(world). Make sure you url encode the
            Message 5 of 6 , Oct 25, 2013

              We had the same problem. We fixed it by surrounding each word with parents.

              So to search for hello world do q=(hello)(world).

              Make sure you url encode the parents.

              Alain

              On Oct 24, 2013 9:03 AM, <m.bonfigli@...> wrote:
               

              Hi,

              I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
              Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
              Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
              Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

              Thanks,
                       m.
            • benksandrew
              Can anyone have a look at this topic - http://groups.yahoo.com/neo/groups/ysearchboss/conversations/messages/5673 It s been a long time now that it was
              Message 6 of 6 , Nov 4 1:31 AM

                Can anyone have a look at this topic -  http://groups.yahoo.com/neo/groups/ysearchboss/conversations/messages/5673


                It's been a long time now that it was posted, and still no one replied...



                ---In ysearchboss@yahoogroups.com, <alaindesilets0@...> wrote:

                We had the same problem. We fixed it by surrounding each word with parents.

                So to search for hello world do q=(hello)(world).

                Make sure you url encode the parents.

                Alain

                On Oct 24, 2013 9:03 AM, <m.bonfigli@...> wrote:
                 

                Hi,

                I just started using BOSS and ran into a problem. I'm calling the service using java sample code found here.
                Everything goes fine as long as I search a single word. OAuth is ok and the response too. When I ask for a search composed by two or more words, i receive the XML message with description:
                Please provide valid credentials. OAuth oauth_problem="signature_invalid", realm="yahooapis.com"
                Any hint? Shouldn't it be fine to call the same service the same way with two values in the parameter?

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