Skip to main content

API Key Authentication

To authenticate requests to the Mimbla API, you need to include your API key in the header of each request. The API key is a unique identifier that is used to authenticate your account and authorize access to the API.

To get your API key, follow these steps:

  1. Log in to your Mimbla account.
  2. Go to the your business settings.
  3. Click on the API key tab.
  4. Click on the "Create new API key" button.
  5. Copy the API key and store it in a secure location.

Once you have your API key, you can include it in the header of your requests like this:

GET https://www.mimbla.com/api/v1/merchant/balance

Content-Type: application/json
MB-API-KEY: <YOUR API KEY>

Replace YOUR API KEY with your actual API key.

YOU MUST INCLUDE THE MB-API-KEY HEADER IN EVERY REQUEST TO THE API.

If you don't include the API key in the header, your request will be rejected and you'll receive a 401 Unauthorized response.

HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
"message": "Invalid API key"
}

Now you can start making requests to the Mimbla API using your API key to authenticate and authorize your account. If you have any questions or need help with anything, please don't hesitate to contact us.

Code examples

Here is an example of how you can make a request to the Mimbla:

request.php
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.mimbla.com/api/v1/merchant/balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'MB-API-KEY: <YOUR API KEY>'
),
));

$response = curl_exec($curl);

curl_close($curl);

echo $response;
The snippets above were generated using AI and may not be 100% accurate. Please verify the code before using it in your project.