I am using https://developer.companieshouse.gov.uk/api/docs/ to access an API I have my API key, however, i am not sure how to pass that from VBA. So far i tried below
Basic auth requires the username and password to be base 64 encoded together. The AuthKey you need to pass is essentially:
def unencoded_auth = "[username]:[authkey]"
def encoded_auth = *call-to-base64-encode-value*(unencoded_auth)
Then you would replace
"Basic " & AuthKey
with
"Basic " & encoded_auth
I'll reference this post as to how to achieve the base64 encoding.