1

I'm trying to get search results through YAHOO BOSS search api. For some reason i get the error - "The remote server returned an error: (403) Forbidden.". At first i thought it was because i didn't add payment method but even after adding it i get the same error.

This is my code (in C#):

        var uri = new Uri("https://yboss.yahooapis.com/ysearch/web?callback=json2&q=flu");
        string url, param;
        var oAuth = new OAuthBase();
        var nonce = oAuth.GenerateNonce();
        var timeStamp = oAuth.GenerateTimeStamp();
        var signature = oAuth.GenerateSignature(uri, consumerKey,
        consumerSecret, string.Empty, string.Empty, "GET", timeStamp, nonce,
        OAuthBase.SignatureTypes.HMACSHA1, out url, out param);

        WebRequest request =  WebRequest.Create(string.Format("{0}?{1}&oauth_signature={2}",url, param, signature));

        using (WebResponse res = request.GetResponse())
        {
            string results = res.ToString();
        }
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364

0 Answers0