HTTP 请求
curl https://api.iagenify.com/api/auth/profile \
-X PUT \
-H "Authorization: Bearer $IAGENIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prenom":"Ada","nom":"Lovelace","ville":"London"}'JavaScript
const response = await fetch("https://api.iagenify.com/api/auth/profile", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({
"prenom": "Ada",
"nom": "Lovelace",
"ville": "London"
}),
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);Python
import os, requests
response = requests.request(
"PUT",
"https://api.iagenify.com/api/auth/profile",
headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
json={
"prenom": "Ada",
"nom": "Lovelace",
"ville": "London"
},
timeout=30,
)
response.raise_for_status()
result = response.json()请求体
nomstring姓 姓 姓 姓 姓 姓 姓 姓 姓
prenomstring名声
genrestring性别价值简介。
telstring电话号码。
adressestring邮政地址。
villestring城市
成功响应
{ ok: true, user: { id: "…", prenom: "Ada", nom: "Lovelace" } }只发送有意更改
空值会被此端点忽略。 当仅编辑一个字段时, 不要发送整个缓存配置 。
密码不是公开的 API 操作操作操作
使用签名的账户设置更改密码。 <code>password</code> 在这里返回返回 <code>403 password_change_private</code>.