Skip to content

Hello

GET https://api.xerberusapp.com/hello/

Required headers

Authorization: Bearer <access_token>

Description

The hello endpoint is a test endpoint where you can use to test your access key. A successful request returns a data object with the message Hello you!

Example requests

cURL:

curl -X GET https://api.xerberusapp.com/hello -H 'Authorization: Bearer 2f563a4909b0f2d28de9d454030b0b6f48bf321b'

PHP:

<?php
$curl = curl_init();

# Usually stored in your database until expires
$access_token = "2f563a4909b0f2d28de9d454030b0b6f48bf321b";

curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => "http://xerberusapi/hello",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer {$access_token}"
    ]
]);

# Contains your access token data
$response = json_decode(curl_exec($curl));
curl_close($curl);

Example responses

Success:

{
    "data":{
        "message": "Hello you!"
    }
}

Expired token:

{
    "error": "invalid_token",
    "error_description": "The access token provided has expired"
}