/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))
}Verbraucher (B2C)
Portfolio-Benutzernamen beanspruchen
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))
}Beansprucht einen eindeutigen Benutzernamen für den angemeldeten Verbraucher. Verwenden Sie einen gültigen Benutzernamen in Kleinbuchstaben und behandeln Sie einen Konflikt, falls dieser bereits vergeben ist. Das Beanspruchen eines Benutzernamens veröffentlicht private Schutzmaßnahmen nicht automatisch; die Sichtbarkeit des Portfolios wird separat gesteuert.

