Authentication

Authentication to the Maintenance Connection Web API is done via the Authorization header in you HTTP request. If your Authorization header is set incorrectly or is missing from your request the server will respond with an HTTP status code of 401 Unauthorized.

To create this Authorization header you will need 2 things:

  • The Connection Key for the database you are trying to access
  • An API key supplied by MC for accessing this database

Once you have these 2 pieces of information they must be combined into a string as "ConnectionKey:APIKey". The resulting string is then Base64 encoded to give you your API Token. Your Authorization header should be set using the "Basic" authentication scheme followed by the API token generated in the previous step.

When completed the Authorization header will look something like this:

Basic RGV2bGFiOkE4MzVEQkYzLTG4NjMtNDJBRi05OUNDLMMxOTlDOTY2MDxyOQ==