Proteger contenido (Consumer Mint)
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/mint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/mint"
payload = { "content_hash": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/mint"
payload := strings.NewReader("{\n \"content_hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"protection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verify_url": "<string>",
"share_url": "<string>",
"content_hash": "<string>",
"protected_at": "2023-11-07T05:31:56Z",
"status": "protected"
}Consumidor (B2C)
Proteger contenido (Consumer Mint)
Acuñe una atestación criptográfica para el contenido que desea proteger. Su emisor personal y clave de firma se resuelven automáticamente. Hashing el contenido del lado del cliente (SHA-256) y envíe el hash con los metadatos del archivo.
POST
/
v1
/
consumer
/
mint
Proteger contenido (Consumer Mint)
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/mint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/mint"
payload = { "content_hash": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/mint"
payload := strings.NewReader("{\n \"content_hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"protection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verify_url": "<string>",
"share_url": "<string>",
"content_hash": "<string>",
"protected_at": "2023-11-07T05:31:56Z",
"status": "protected"
}Acuñe una atestación criptográfica para un contenido que desee proteger. Su emisor personal y clave de firma se resuelven automáticamente; no necesita crear un emisor ni registrar una clave.
Haga un hash de su contenido en el lado del cliente con SHA-256 y envíe el hash junto con los metadatos del archivo. El endpoint devuelve un registro de protección con una URL de prueba compartible que puede usar para demostrar la autoría.
Los límites de velocidad dependen del nivel de su plan:
La respuesta incluye
| Plan | Protecciones por mes |
|---|---|
| Gratuito | 50 |
| Creador | 500 |
| Pro | Dependiente del plan |
content_hash y protected_at para que pueda confirmar qué contenido fue protegido y la marca de tiempo exacta sin realizar una llamada de seguimiento.
Respuestas
Cuerpo
application/json
Respuesta
Contenido protegido

