【发布时间】:2018-05-05 10:38:46
【问题描述】:
我正在使用https://developer.companieshouse.gov.uk/api/docs/ 访问 API 我有我的 API 密钥,但是,我不确定如何从 VBA 传递它。到目前为止,我在下面尝试过
AuthKey = [Key received]
With CreateObject("Microsoft.XMLHTTP")
.Open "GET", strUrl, False, authKey
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Authorization", "Basic " & AuthKey
.Send
response = .ResponseText
End With
当我从他们的测试页面https://developer.companieshouse.gov.uk/document/docs/document/id/content/fetchDocument.html 尝试时,它运行良好,当我转到授权密钥不同的开发工具时,我想我缺少一些编码。有人可以帮忙吗
谢谢
【问题讨论】: