Atualizar usuario autenticado
curl --request PATCH \
--url http://localhost:4000/v1/auth/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
email: 'jsmith@example.com',
username: '<string>',
avatarUrl: '<string>'
})
};
fetch('http://localhost:4000/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/auth/me"
payload = {
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/auth/me"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"username\": \"<string>\",\n \"avatarUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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>",
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}Atualizar usuario autenticado
PATCH
/
v1
/
auth
/
me
Atualizar usuario autenticado
curl --request PATCH \
--url http://localhost:4000/v1/auth/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
displayName: '<string>',
email: 'jsmith@example.com',
username: '<string>',
avatarUrl: '<string>'
})
};
fetch('http://localhost:4000/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/auth/me"
payload = {
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/auth/me"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"username\": \"<string>\",\n \"avatarUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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>",
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.