Authentication and Authorization

Each user is given an API key (and can regenerate it) when they register. Requests to a phpVMS API will require an X-API-Key header, with this key. Addons can take advantage of this by adding the api.auth middleware to their route group.

Headers Example

X-API-Key: {user API key}
Content-type: application/json

Sample cURL Request

$api_key = 'YOUR API KEY';
$url = "";
$headers = [
    'X-API-Key:' . $api_key,

$ch = curl_init();

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

json_response = \json_decode(curl_exec($ch));

echo $json_response;