تحديث رؤية الحماية
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
}المستهلك (B2C)
تحديث رؤية الحماية
تبديل حماية المحتوى بين عام وخاص.
PUT
/
v1
/
consumer
/
protections
/
{id}
/
visibility
تحديث رؤية الحماية
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
غيّر ما إذا كانت حماية المحتوى مرئية للعامة في محفظتك أو مخفية. تظهر الحمايات العامة في فحوصات التشابه وفي صفحة ملفك الشخصي العام. الحمايات الخاصة مرئية لك فقط.
يمكنك فقط تحديث الرؤية لحماياتك الخاصة.
/v1/consumer/protections/{id}/visibility
