JWT Token - salonized/public-api GitHub Wiki
For some partners a JWT (JSON Web Tokens) token system is used to supply additional parameters about a booking. You can read more about JWT here https://jwt.io/ or https://en.wikipedia.org/wiki/JSON_Web_Token
PHP
Use any library for JWT token generation like https://github.com/firebase/php-jwt
We use the JWT exp parameter to expire tokens.
The value of this param should be a unix timestamp no longer than about 30/60 minutes in the future.
Our system will throw an error when the current time has passed the timestamp given in exp.
Example
use \Firebase\JWT\JWT;
$secret = "SECRET_GIVEN_BY_SALONIZED";
$token = array(
"exp" => 1357000000,
"custom_param_1" => "foo",
"custom_param_2" => "bar"
);
$url = "https://salonized.salonized.com/bookings/new?token=" . $token;