Any questions

We are happy to help!

Question about Gecko Booking?

If you are unsure whether Gecko Booking is right for you, or if you have other questions, we would love to hear from you!

All good!
Please enter your name.
All good!
Please enter your email.
All good!
All good!
Please enter your question.

Fields marked with an * are required

Guides - TOKEN - Login (frontend)

TOKEN - Login (frontend)

If you already have a login on your website, e.g. in the form of an Intranet, you can with TOKEN-Log avoid that your customers/users must log in double.

The Token-login is found and activated under advanced settings.

The feature works by your system calling up the system via secure connection (https: //), from an approved IP, with information about the user you would like to log in.

Hereafter you will receive a Token from the booking system, which can be inserted into the insertion code of the booking system. This token will log in the user in question.

Depending on your wishes, you can adjust the following:
- Lifetime of Token. Per default it is set to 1 minute, which should be more than enough.
- Should customer information be updated. That is, should the spaces in GECKO be overwritten with the spaces you send along.
- Should customers be created automatically, if they do not exist, or is it only for known users.
- Which space is unique? If you already have a local userID you may insert this in the space for the customer no. and use this as the focal point of Token login.

 

The following is an example of the use of TOKEN-Log, written in PHP as GET.

  • [INSERT_AGREEMENT_NUMBER_HERE] is your agreement no.
  • [INSERT_ICCODE_HERE] is the ICCODE from the insertion code you want to use. Read more about our insertion codes here.

		$tokenLoginUrlAdd = "";
if (logic for user is logged in here, eg. session check){

    $tokenUrl = "https://app.geckobooking.com/site/token.php?do=tokenLogin&tk=[INSERT_TOKENKEY_1_HERE]&tk2=[INSERT_TOKENKEY_2_HERE]&id=[INSERT_AGREEMENT_NUMBER_HERE]";
    $tokenUrl .= "&CustomerNumber=".urlencode($MyLocalCustomerNumber);
    $tokenUrl .= "&CustomerName=".urlencode($MyLocalCustomerName);
    $tokenUrl .= "&CustomerAddress=".urlencode($MyLocalCustomerAddress);
    $tokenUrl .= "&CustomerPostalCode=".urlencode($MyLocalCustomerPostalCode);
    $tokenUrl .= "&CustomerCity=".urlencode($CustomerCity);
    $tokenUrl .= "&CustomerEmail=".urlencode($MyLocalCustomerEmail);
    $tokenUrl .= "&CustomerTelephone=".urlencode($MyLocalCustomerPhone);
    $tokenUrl .= "&CustomerMobile=".urlencode($MyLocalCustomerMobile);
    $tokenUrl .= "&CustomerSSN=".urlencode($MyLocalCustomerSocialSecurityNumber);

    $result = file_get_contents($tokenUrl);
    if ($result != "false"){
        $tokenLoginUrlAdd = "&token=".$result;
    }


}

echo "<script type="text/javascript" src="https://app.geckobooking.com/site/iframe.js?icCode=[INSERT_ICCODE_HERE]".$tokenLoginUrlAdd.""></script>";

Example using POST vars and cUrl, and thus also makes it possible to transmit information with the BEF spaces. Using POST is recommended, as it can handle longer text strings.


		if (logic for user is logged in here, eg. session check){


    $token1 = "[INSERT_TOKENKEY_1_HERE]";
    $token2 = "[INSERT_TOKENKEY_2_HERE]";
    $id     = "[INSERT_AGREEMENT_NUMBER_HERE]";

    $fieldArr = array(
                    "do" => "tokenLogin",
                    "tk" => $token1,
                    "tk2" => $token2,
                    "id" => $id,
                    "CustomerNumber" => $MyLocalCustomerNumber,
                    "CustomerName" => $MyLocalCustomerName,
                    "CustomerAddress" => $MyLocalCustomerAddress,
                    "CustomerPostalCode" => $MyLocalCustomerPostalCode,
                    "CustomerCity" => $CustomerCity,
                    "CustomerEmail" => $MyLocalCustomerEmail,
                    "CustomerTelephone" => $MyLocalCustomerPhone,
                    "CustomerMobile" => $MyLocalCustomerMobile,
                    "CustomerSSN" => $MyLocalCustomerSocialSecurityNumber,
                    "CustomerPassword" => $MyLocalPassword
                );

    // Hvis tekst til BEF felter
    if ($includeBEF) {

        // example -     $bef[INSERT_BEFID] = $yourvalue;
        $bef[99999999] = "Test value A";
        $bef[88888888] = "Test value B";
        foreach ($bef as $k => $v) {
            $bef[$k] = utf8_encode($v);
        }
        $fieldArr["bef"] = json_encode($bef);

    }

    foreach($fieldArr as $key => $value) {
        $fieldStr .= $key."=".urlencode($value)."&";
    }
    rtrim($fieldStr, '&');

    $ch = curl_init();
    curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch,CURLOPT_URL, "https://app.geckobooking.com/site/token.php");
    curl_setopt($ch,CURLOPT_POST, count($fieldArr));
    curl_setopt($ch,CURLOPT_POSTFIELDS, $fieldStr);
    $result = curl_exec($ch);

    if ($result != "false"){

        echo "<script type="text/javascript" src="https://app.geckobooking.com/site/iframe.js?icCode=[INSERT_ICCODE_HERE]".$tokenLoginUrlAdd.""></script>";
        
    }

    //close connection
    curl_close($ch);

}

 


Try a Free and Non-Binding Demo of Gecko Booking & Administration

Fill out the form, and you will receive a demo as soon as possible.

All good!
Please enter the company name.
All good!
Please enter your phone number.
All good!
Please enter your name.

Fields marked with an * are required