【发布时间】:2020-03-03 18:57:54
【问题描述】:
我使用了 Crossref REST API,我只是在浏览器地址栏中向其发送查询,然后以 JSON 格式返回结果。
所以我发送以下网址:
https://api.crossref.org/works?query.bibliographic=Randomized trial of intensive early intervention for children with pervasive developmental disorder&query.author=Groen&rows=1
我希望 Microsoft REST API 也是如此,但如果我发送它:
我收到“由于订阅密钥无效而拒绝访问”。
我可以通过 URL 传递我的密钥吗?如果有怎么办?
还是没那么简单。
它还需要其他代码吗?如果需要,我可以用 PHP 编写代码,或者使用 jQuery。
类似:
$(document).ready(function() {
$.ajax({
type:'GET',
url:'https://api.crossref.org/works?query.bibliographic=<?php echo $title ?>&query.author=<?php echo $author ?>&rows=1&select=is-referenced-by-count,author,title,DOI,issn-type,volume,issue,link,page,abstract',
success:function(result) {
var total_results = result.message["total-results"];
}
});
但同样,使用 Microsoft API - 我将如何向它发送密钥?
谢谢。
【问题讨论】: