Update current user profile
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', image: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/iam/users/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/iam/users/profile"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"image\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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))
}curl --request PATCH \
--url https://api.example.com/v1/regions/global/iam/users/profile \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"image": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/iam/users/profile"
payload = {
"name": "<string>",
"image": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"email": "jsmith@example.com",
"emailVerified": true,
"status": "active",
"name": "<string>",
"image": "<string>",
"mfaEnabled": true,
"lastLoginAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}IAM Users
Update current user profile
Update the authenticated user’s profile
PATCH
/
v1
/
regions
/
global
/
iam
/
users
/
profile
Update current user profile
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', image: '<string>'})
};
fetch('https://api.example.com/v1/regions/global/iam/users/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/iam/users/profile"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"image\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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))
}curl --request PATCH \
--url https://api.example.com/v1/regions/global/iam/users/profile \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"image": "<string>"
}
'import requests
url = "https://api.example.com/v1/regions/global/iam/users/profile"
payload = {
"name": "<string>",
"image": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"email": "jsmith@example.com",
"emailVerified": true,
"status": "active",
"name": "<string>",
"image": "<string>",
"mfaEnabled": true,
"lastLoginAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Was this page helpful?