Hey, I keep getting errors when trying to do a search. {"error": "Invalid Authorization", "type": "ch:service"}
I have a “stream api key”
My basic fetch request is:
var url = `api.company-information.service.gov.uk/search/companies?items_per_page=10&q=${string}` fetch(url, { method: 'GET', headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'Authorization' : `Basic ${APIKEY}`, } });
The APIKEY var is what is provided by the service - my stream key basically.
Is there a step I am missing here to enable this to connect with javascript?