/v1/consumer/me/username
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/me/username \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/me/username', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/me/username"
payload = { "username": "<string>" }
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/me/username"
payload := strings.NewReader("{\n \"username\": \"<string>\"\n}")
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))
}المستهلك (B2C)
المطالبة باسم مستخدم للمحفظة
PUT
/
v1
/
consumer
/
me
/
username
/v1/consumer/me/username
curl --request PUT \
--url https://api.truthlocks.com/v1/consumer/me/username \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/me/username', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/me/username"
payload = { "username": "<string>" }
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/me/username"
payload := strings.NewReader("{\n \"username\": \"<string>\"\n}")
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))
}يطالب باسم مستخدم فريد للمستهلك الذي قام بتسجيل الدخول. استخدم اسم مستخدم صالحًا بأحرف صغيرة وتعامل مع التعارض إذا كان الاسم مخصصًا بالفعل. المطالبة باسم مستخدم لا تنشر الحمايات الخاصة تلقائيًا؛ يتم التحكم في رؤية المحفظة بشكل منفصل.

