Create an iframe Token
Returns a token that allows you to open and display an iframe, for example the laser treatment planner for a specific case.
Required Parameters:
- Public key
- Hashed private key
- User key
- Type of token = 'iframe'
- case_id (unique ID for the case, see 'Create iframe case')
URL
Required Parameters:
- Public key
- Hashed private key
- User key
- Type of token = 'iframe'
- case_id (unique ID for the case, see 'Create iframe case')
POST https://www.zubisoft.com/api/token
Below an example how the request could look like. Please note the $data['type'] = 'iframe' and the $data['case_id] = 'YourCaseId' parameters.
$headers = [
'Content-Type: application/json',
'X-Private-Key: ' . 'yourPublicKey',
'X-Public-Key: ' . hash('SHA256', 'yourPrivateKey'),
'X-User-Key: ' . 'eSignOfYourUser'
];
$data['type'] = 'iframe';
$data['case_id] = 'YourCaseId';
$data = json_encode($data);
##### CURL
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.zubisoft.com/api/token',
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => 1,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLINFO_HEADER_OUT => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_POSTFIELDS => $data));
$response = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
$obj = json_decode($response,true);
The token will expire after 30 seconds. Any new token will revoke possibly still active older tokens.
{"token":"d51y7eNjh1p86k2mL2CK5EZNgMX4bAgsh7MJmQ"}
You can access the laser treatment planner iframe with the following link:
https://www.zubisoft.com/api_planner/laser/index.php?token=YourToken
You can access the IOL treatment planner iframe with the following link:
https://www.zubisoft.com/api_planner/iol/index.php?token=YourToken