Hello
I am using the stream service and I have a valid key according to the stream keys section on the API site.
When I try to test the key I receive
- Trying 13.43.66.204:443…
- Connected to stream.companieshouse.gov.uk (13.43.66.204) port 443 (#0)
- ALPN: offers h2,http/1.1
- TLSv1.3 (OUT), TLS handshake, Client hello (1):
- CAfile: /etc/ssl/certs/ca-certificates.crt
- CApath: /etc/ssl/certs
- TLSv1.3 (IN), TLS handshake, Server hello (2):
- TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
- TLSv1.3 (IN), TLS handshake, Certificate (11):
- TLSv1.3 (IN), TLS handshake, CERT verify (15):
- TLSv1.3 (IN), TLS handshake, Finished (20):
- TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
- TLSv1.3 (OUT), TLS handshake, Finished (20):
- SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
- ALPN: server accepted h2
- Server certificate:
- subject: C=GB; L=Cardiff; O=Companies House; CN=*.companieshouse.gov.uk
- start date: Oct 8 00:00:00 2024 GMT
- expire date: Oct 16 23:59:59 2025 GMT
- subjectAltName: host “stream.companieshouse.gov.uk” matched cert’s “*.companieshouse.gov.uk”
- issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust TLS RSA CA G1
- SSL certificate verify ok.
- using HTTP/2
- Server auth using Basic with user ‘c00a8f2f-ca84-4bf6-b167-d7fd82cec18a’
- h2h3 [:method: GET]
- h2h3 [:path: /companies?timepoint=187124872486]
- h2h3 [:scheme: https]
- h2h3 [:authority: stream.companieshouse.gov.uk]
- h2h3 [authorization: Basic YzAwYThmMmYtY2E4NC00YmY2LWIxNjctZDdmZDgyY2VjMThhOg==]
- h2h3 [user-agent: curl/7.88.1]
- h2h3 [accept: /]
- Using Stream ID: 1 (easy handle 0x56556e8f2780)
GET /companies?timepoint=187124872486 HTTP/2
Host: stream.companieshouse.gov.uk
authorization: Basic YzAwYThmMmYtY2E4NC00YmY2LWIxNjctZDdmZDgyY2VjMThhOg==
user-agent: curl/7.88.1
accept: /
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 401
< date: Wed, 30 Apr 2025 09:52:35 GMT
< content-type: application/json
< content-length: 53
< access-control-allow-origin: *
< ch-authentication-error: Invalid Authorization
< www-authenticate: Invalid or no Authorisation header has been provided
< - Connection #0 to host stream.companieshouse.gov.uk left intact
Invalid Authorisation.
I am using my key in this test line you provide
curl -XGET -u my_api_key: https://api.company-information.service.gov.uk/company/00000006
What am I doing wrong>
Do I have to wait to be approved? Key not live yet? Wrong use of the key?
Is there any code examples using PHP or otherwise I can download to instruct me more clearly
Many thanks