Authentication

Authenticate with your credentials to receive an API key for all subsequent API calls.


Endpoint

Live

POST https://business.festivalcadeau.com/api/endpoint/v1/authenticate/

Sandbox

POST https://business.festivalcadeautestsite.nl/api/endpoint/v1/authenticate/

Authentication Method

This endpoint uses Basic Authentication. Provide your email address and password in the request. Credentials are provided by Festivalcadeau.

Request Parameters

Parameter Type Required Description
email string Yes Your email address (provided by Festivalcadeau)
password string Yes Your password (provided by Festivalcadeau)

Response

Success 200 OK

{
    "apikey": "9REP0TLNHhpkhlR3SREukTO3pCgXnTsyrCVyXBzuS3WUjlHApgxqVIHaVxp0"
}

Error 401 Unauthorized

Returned when the email or password is incorrect.


Example Usage (PHP)

<?php

$url = 'https://business.festivalcadeau.com/api/endpoint/v1/authenticate/';
$username = 'user-email';
$password = 'user-password';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo $result;
}

curl_close($ch);