Encode a message
GET — simple request with query parameters (default ttl: 1h):
curl "https://sss.ardas.dp.ua/encode?message=my+secret&ttl=30m"
GET — with spaces or special characters:
curl -G "https://sss.ardas.dp.ua/encode" \
--data-urlencode "message=password@123 with spaces" \
--data-urlencode "ttl=1h"
POST — JSON body:
curl -X POST https://sss.ardas.dp.ua/api/encode \
-H "Content-Type: application/json" \
-d '{"message": "my secret", "ttl": "1h"}'
Response: {"success":true,"token":"abc123...","expires_at":"...","ttl_label":"1h"}
Decode a message
GET:
curl "https://sss.ardas.dp.ua/decode?token=TOKEN_HERE"
POST — JSON body:
curl -X POST https://sss.ardas.dp.ua/api/decode \
-H "Content-Type: application/json" \
-d '{"token": "TOKEN_HERE"}'
Response: {"success":true,"message":"my secret"}