Mettre à jour la visibilité de la protection
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/protections/{id}/visibility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.truthlocks.com/v1/consumer/protections/{id}/visibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/protections/{id}/visibility"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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/protections/{id}/visibility"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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))
}{
"id": "<string>",
"visibility": "<string>",
"updated_at": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Consommateur (B2C)
Mettre à jour la visibilité de la protection
Basculez une protection de contenu entre public et privé.
PUT
/
v1
/
consumer
/
protections
/
{id}
/
visibility
Mettre à jour la visibilité de la protection
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/protections/{id}/visibility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.truthlocks.com/v1/consumer/protections/{id}/visibility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/protections/{id}/visibility"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(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/protections/{id}/visibility"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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))
}{
"id": "<string>",
"visibility": "<string>",
"updated_at": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}PUT
Définissez si une protection de contenu est publiquement visible sur votre portefeuille ou masquée. Les protections publiques apparaissent dans les vérifications de similarité et sur votre page de profil public. Les protections privées ne sont visibles que par vous.
Vous ne pouvez mettre à jour la visibilité que pour vos propres protections.
/v1/consumer/protections/{id}/visibilityRéponses
Corps
application/json

