π API keys
Company.info makes use of API keys in the API hub. An API key is a unique identifier that acts as a token for authenticating. It is issued by the API provider and must be included in each request to gain access to the API.
To authenticate a request, a request must include the API key in the header of the HTTP request. The API server validates the API key against the registered keys. If the key is valid, the request is processed; otherwise, an authentication error is returned.
While the API uses API keys for authentication, it does not implement additional authorization mechanisms. This means that once authenticated, access to all resources will be available via the API. It is the responsibility of the client to ensure that they do not exceed their permitted use and adhere to the terms and conditions of API usage.
βοΈ Policies
A key has been set with one or multiple policies. So, that doesn't mean every key has the rights to access all of the API's.
πΊοΈ Where to get?
During the onboarding process, a technical contact person has been chosen. Once the onboarding process has been completed, this person will receive an email with the API key.
How to use?
To use the API key, include the API key in the header with the X-API-Key
key like in the example below.
curl -X GET 'https://api.company.info/example' \
-H 'accept: application/vnd.api+json' \
-H 'X-API-KEY: xxx'
Possible issues
Error Code | Error | Solution |
---|---|---|
400 | Access to this API has been disallowed | The key probably doesn't contain the right policies or is expired. Please contact our support team. |
401 | Authorization Field Missing | Please verify if you provide the API key in the header properly |