获取 API 密钥
身份验证

PUT /api/auth/profile

PUT https://api.iagenify.com/api/auth/profile

更新认证账户的配置文件字段。请求中遗漏的字段保持不变。

Bearer 或 API 密钥JSON修改账户

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>.