Oauth 如何使用Bing';什么是搜索API?

Oauth 如何使用Bing';什么是搜索API?,oauth,get,bing,Oauth,Get,Bing,我很难理解Oauth验证。我正在尝试使用bing的搜索api。他们要求oauth验证。我有他们给我的主键。我遇到的问题是如何发出请求,提供oauth验证密钥 例如,如果我尝试通过以下方式发出get请求: http//api.datamarket.azure.com/Bing/Search?Query=%27xbox%27 我收到一个错误 The authorization type you provided is not supported. Only Basic and OAuth are

我很难理解Oauth验证。我正在尝试使用bing的搜索api。他们要求oauth验证。我有他们给我的主键。我遇到的问题是如何发出请求,提供oauth验证密钥

例如,如果我尝试通过以下方式发出get请求:

http//api.datamarket.azure.com/Bing/Search?Query=%27xbox%27
我收到一个错误

The authorization type you provided is not supported.  Only Basic and OAuth are supported
所以问题是,我是否将我的密钥嵌入URL,比如

http//api.datamarket.azure.com/Bing/Search?Query=%27xbox%27&authetication="myautherizationkey"

如何提供凭据以访问他们的api?

这不是一个完整的答案,因为我仍然收到一个“401 Unauthorized”错误,但下面是我如何为AngularJS配置OAuth的。这是一个必应图像搜索

var accountKey = '/*Your Account Key*/';
    var base64EncodedKey = btoa(accountKey);
    $http({
      method: 'GET',  
      url: 'https://api.datamarket.azure.com/Bing/Search/v1/Image?Query=%27Pizza%27&$format=JSON',
      headers: {'Authorization': 'Bearer ' + base64EncodedKey}
    }).success(function(json) {
      console.log('Returned: ' + JSON.stringify(json)); 
    }).error(function(err) {
      console.log('There was an error retrieving the image JSON: ' + err); 
    });
这至少消除了授权类型错误,但我提供帐户密钥的方式似乎仍然存在错误。希望它能为你指明正确的方向