c# - Getting error Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com" -
c# - Getting error Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com" -
i working on " http://developer.yahoo.com/yql/console/ " site. http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20social.profile%20where%20guid='zgvg52zdaygczrff4vba5l6icy'
when come in executed string in address bar
please provide valid credentials. oauth oauth_problem="ost_oauth_parameter_absent_error", realm="yahooapis.com" cooured think authentication error occure . couldnot understand set authentication parameter api ? in url ? how ? please help illustration code.
i think need add together authorization header requesting uri header. thing this
string headerstring = "authorization: oauth realm=your oauth realm&" + "oauth_timestamp= xxxxxxxx&oauth_nonce=your value&,"+ "oauth_version=1.0&oauth_signature_method=hmac-sha1&"+ "oauth_consumer_key=your key&,oauth_token=your token&"+ "oauth_signature=your signature"; var req = (httpwebrequest)webrequest.create("requsting uri"); req.contenttype = "application/xml"; req.method = "post"; req.headers.add(headerstring); httpwebresponse resp = (httpwebresponse)req.getresponse(); var sr = new streamreader(resp.getresponsestream()); string response = sr.readtoend().trim();
here assuming making post call.
c# asp.net
Comments
Post a Comment