The first step is to sign-in to the developer hub, then you can request an API key by clicking on "Your Applications". Once you have this, you can proceed to the next step, which is to try our our APIs through the API explorers included in the web page documentation of every API endpoint. For example: https://developer.companieshouse.gov.uk/api/docs/search/companies/companysearch.html
Once you have done this, you will have all the experience you need to be able to call the APIs from your own code. The following forum post should also help you, but I would recommend you search the forum for "authentication" topics, in case your issue has already been solved:
Also, the Example at the bottom of the APIKey authorisation documentation (https://developer.companieshouse.gov.uk/api/docs/index/gettingStarted/apikey_authorisation.html) shows you exactly what must be sent with each API request. If you cut-and-paste the
curl example, but substituting your API key in place of
my_api_key (but you must remember to have a '
:' following it), then you shouldn't have any problems.
Curl will be generating the correct HTTP Authentication header (Basic authentication) for you, and your HTTP client library should also do this, but if it does not and you find you have to do this yourself, the APIKey authorisation documentation explains how - there is a link to the Wikipedia page showing how a HTTP Basic access authentication header value is created.
This previous answer also gives code examples:
Hope that helps.