https://seecret.it/api
Toutes les requêtes vers l'API doivent inclure un en-tête Authorization
valide contenant un token UUID :
Authorization: Bearer VOTRE_TOKEN_UUID
Envoyez une requête POST
avec les champs suivants :
Paramètre | Type | Obligatoire | Description |
---|---|---|---|
operation | string | ✅ | Doit être create_seecret |
lang | string | ✅ | fr ou en |
seecret | string | ✅ | Contenu texte du seecret |
expiration_date | date (YYYY-MM-DD) | ❌ | Optionnel, par défaut +7 jours |
number_view | int | ❌ | Optionnel, par défaut 1 |
view_notification | int (0 ou 1) | ❌ | Envoyer un e-mail à la consultation (défaut : 1) |
password | string | ❌ | Mot de passe facultatif pour sécuriser l'accès |
domain | string | ❌ | Domaine du lien généré |
$ch = curl_init("https://seecret.it/api");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer VOTRE_TOKEN_UUID',
'Content-Type: application/x-www-form-urlencoded'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'operation' => 'create_seecret',
'lang' => 'fr',
'seecret' => 'Mot de passe Wi-Fi : 12345678',
'expiration_date' => '2025-06-01',
'number_view' => 1,
'view_notification' => 1
]));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
{
"CODE": 200,
"MESSAGE": "Seecret créé avec succès",
"data": {
"RESULT": "success",
"URL": "https://seecret.it/_XyZAbCd"
}
}
{
"CODE": 401,
"MESSAGE": "Paramètre 'operation' manquant."
}