自托管认证
生成一个电子邮件操作链接。
post
/admin/generate_link正文
- data可选object
- email可选字符串
- new_email可选字符串
- password可选字符串
- redirect_to可选字符串
- type可选字符串
响应代码
- 200
- 401
响应 (200)
1{2 "action_link": "lorem",3 "app_metadata": {4 "property1": null,5 "property2": null6 },7 "aud": "lorem",8 "banned_until": "2021-12-31T23:34:00Z",9 "confirmation_sent_at": "2021-12-31T23:34:00Z",10 "confirmed_at": "2021-12-31T23:34:00Z",11 "created_at": "2021-12-31T23:34:00Z",12 "email": "lorem",13 "email_change_sent_at": "2021-12-31T23:34:00Z",14 "email_confirmed_at": "2021-12-31T23:34:00Z",15 "email_otp": "lorem",16 "hashed_token": "lorem",17 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",18 "identities": [19 {20 "created_at": "2021-12-31T23:34:00Z",21 "id": "lorem",22 "identity_data": {23 "property1": null,24 "property2": null25 },26 "last_sign_in_at": "2021-12-31T23:34:00Z",27 "provider": "lorem",28 "updated_at": "2021-12-31T23:34:00Z",29 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"30 }31 ],32 "invited_at": "2021-12-31T23:34:00Z",33 "last_sign_in_at": "2021-12-31T23:34:00Z",34 "new_email": "lorem",35 "new_phone": "lorem",36 "phone": "lorem",37 "phone_change_sent_at": "2021-12-31T23:34:00Z",38 "phone_confirmed_at": "2021-12-31T23:34:00Z",39 "reauthentication_sent_at": "2021-12-31T23:34:00Z",40 "recovery_sent_at": "2021-12-31T23:34:00Z",41 "redirect_to": "lorem",42 "role": "lorem",43 "updated_at": "2021-12-31T23:34:00Z",44 "user_metadata": {45 "property1": null,46 "property2": null47 },48 "verification_type": "lorem"49}获取一个用户。
get
/admin/user/{user_id}路径参数
- user_id必需
用户的 ID
响应代码
- 200
- 401
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}更新一个用户。
put
/admin/user/{user_id}路径参数
- user_id必需
用户的 ID
响应代码
- 200
- 401
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}删除一个用户。
delete
/admin/user/{user_id}路径参数
- user_id必需
用户的 ID
响应代码
- 200
- 401
响应 (200)
1{}列出所有用户。
get
/admin/users响应代码
- 200
- 401
响应 (200)
1{2 "aud": "lorem",3 "users": [4 {5 "app_metadata": {6 "property1": null,7 "property2": null8 },9 "aud": "lorem",10 "banned_until": "2021-12-31T23:34:00Z",11 "confirmation_sent_at": "2021-12-31T23:34:00Z",12 "confirmed_at": "2021-12-31T23:34:00Z",13 "created_at": "2021-12-31T23:34:00Z",14 "email": "lorem",15 "email_change_sent_at": "2021-12-31T23:34:00Z",16 "email_confirmed_at": "2021-12-31T23:34:00Z",17 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",18 "identities": [19 {20 "created_at": "2021-12-31T23:34:00Z",21 "id": "lorem",22 "identity_data": {23 "property1": null,24 "property2": null25 },26 "last_sign_in_at": "2021-12-31T23:34:00Z",27 "provider": "lorem",28 "updated_at": "2021-12-31T23:34:00Z",29 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"30 }31 ],32 "invited_at": "2021-12-31T23:34:00Z",33 "last_sign_in_at": "2021-12-31T23:34:00Z",34 "new_email": "lorem",35 "new_phone": "lorem",36 "phone": "lorem",37 "phone_change_sent_at": "2021-12-31T23:34:00Z",38 "phone_confirmed_at": "2021-12-31T23:34:00Z",39 "reauthentication_sent_at": "2021-12-31T23:34:00Z",40 "recovery_sent_at": "2021-12-31T23:34:00Z",41 "role": "lorem",42 "updated_at": "2021-12-31T23:34:00Z",43 "user_metadata": {44 "property1": null,45 "property2": null46 }47 }48 ]49}返回创建的用户。
post
/admin/users正文
- app_metadata可选object
- aud可选字符串
- ban_duration可选字符串
- email可选字符串
- email_confirm可选boolean
- password可选字符串
- phone可选字符串
- phone_confirm可选boolean
- role可选字符串
- user_metadata可选object
响应代码
- 200
- 401
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}接收来自外部提供商的重定向,在 OAuth 身份验证过程开始时启动创建访问令牌和刷新令牌的过程。
get
/callback响应代码
- 302
gotrue 的 healthcheck 端点。返回当前 gotrue 版本。
get
/health响应代码
- 200
响应 (200)
1{2 "description": "lorem",3 "name": "lorem",4 "version": "lorem"5}向用户发送邀请链接。
post
/invite正文
- data可选object
- email可选字符串
响应代码
- 200
响应 (200)
1{}注销用户。
post
/logout响应代码
- 204
响应 (204)
1{}电子邮件或电话的无密码登录方法。
post
/otp正文
- create_user可选boolean
- data可选object
- email可选字符串
- phone可选字符串
响应代码
- 200
响应 (200)
1{}向用户的电子邮件发送密码恢复链接。
post
/recover正文
- email可选字符串
响应代码
- 200
响应 (200)
1{}返回 gotrue 服务器的配置设置。
get
/settings响应代码
- 200
响应 (200)
1{2 "disable_signup": true,3 "external": {4 "apple": true,5 "azure": true,6 "bitbucket": true,7 "discord": true,8 "email": true,9 "facebook": true,10 "github": true,11 "gitlab": true,12 "google": true,13 "keycloak": true,14 "linkedin": true,15 "notion": true,16 "phone": true,17 "saml": true,18 "slack": true,19 "spotify": true,20 "twitch": true,21 "twitter": true,22 "workos": true,23 "zoom": true24 },25 "mailer_autoconfirm": true,26 "phone_autoconfirm": true,27 "sms_provider": "lorem"28}使用电子邮件或电话的基于密码的注册。
post
/signup正文
- data可选object
- email可选字符串
- password可选字符串
- phone可选字符串
响应代码
- 200
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}使用密码登录用户。
post
/token?grant_type=password正文
- email可选字符串
- password可选字符串
- phone可选字符串
响应代码
- 200
响应 (200)
1{2 "access_token": "lorem",3 "expires_in": 42,4 "refresh_token": "lorem",5 "token_type": "lorem",6 "user": {7 "app_metadata": {8 "property1": null,9 "property2": null10 },11 "aud": "lorem",12 "banned_until": "2021-12-31T23:34:00Z",13 "confirmation_sent_at": "2021-12-31T23:34:00Z",14 "confirmed_at": "2021-12-31T23:34:00Z",15 "created_at": "2021-12-31T23:34:00Z",16 "email": "lorem",17 "email_change_sent_at": "2021-12-31T23:34:00Z",18 "email_confirmed_at": "2021-12-31T23:34:00Z",19 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",20 "identities": [21 {22 "created_at": "2021-12-31T23:34:00Z",23 "id": "lorem",24 "identity_data": {25 "property1": null,26 "property2": null27 },28 "last_sign_in_at": "2021-12-31T23:34:00Z",29 "provider": "lorem",30 "updated_at": "2021-12-31T23:34:00Z",31 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"32 }33 ],34 "invited_at": "2021-12-31T23:34:00Z",35 "last_sign_in_at": "2021-12-31T23:34:00Z",36 "new_email": "lorem",37 "new_phone": "lorem",38 "phone": "lorem",39 "phone_change_sent_at": "2021-12-31T23:34:00Z",40 "phone_confirmed_at": "2021-12-31T23:34:00Z",41 "reauthentication_sent_at": "2021-12-31T23:34:00Z",42 "recovery_sent_at": "2021-12-31T23:34:00Z",43 "role": "lorem",44 "updated_at": "2021-12-31T23:34:00Z",45 "user_metadata": {46 "property1": null,47 "property2": null48 }49 }50}刷新用户的刷新令牌。
post
/token?grant_type=refresh_token正文
- refresh_token可选字符串
响应代码
- 200
响应 (200)
1{2 "access_token": "lorem",3 "expires_in": 42,4 "refresh_token": "lorem",5 "token_type": "lorem",6 "user": {7 "app_metadata": {8 "property1": null,9 "property2": null10 },11 "aud": "lorem",12 "banned_until": "2021-12-31T23:34:00Z",13 "confirmation_sent_at": "2021-12-31T23:34:00Z",14 "confirmed_at": "2021-12-31T23:34:00Z",15 "created_at": "2021-12-31T23:34:00Z",16 "email": "lorem",17 "email_change_sent_at": "2021-12-31T23:34:00Z",18 "email_confirmed_at": "2021-12-31T23:34:00Z",19 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",20 "identities": [21 {22 "created_at": "2021-12-31T23:34:00Z",23 "id": "lorem",24 "identity_data": {25 "property1": null,26 "property2": null27 },28 "last_sign_in_at": "2021-12-31T23:34:00Z",29 "provider": "lorem",30 "updated_at": "2021-12-31T23:34:00Z",31 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"32 }33 ],34 "invited_at": "2021-12-31T23:34:00Z",35 "last_sign_in_at": "2021-12-31T23:34:00Z",36 "new_email": "lorem",37 "new_phone": "lorem",38 "phone": "lorem",39 "phone_change_sent_at": "2021-12-31T23:34:00Z",40 "phone_confirmed_at": "2021-12-31T23:34:00Z",41 "reauthentication_sent_at": "2021-12-31T23:34:00Z",42 "recovery_sent_at": "2021-12-31T23:34:00Z",43 "role": "lorem",44 "updated_at": "2021-12-31T23:34:00Z",45 "user_metadata": {46 "property1": null,47 "property2": null48 }49 }50}获取已登录用户的信息。
get
/user响应代码
- 200
- 401
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}返回更新后的用户。
put
/user正文
- app_metadata可选object
- data可选object
- email可选字符串
- nonce可选字符串
- password可选字符串
- phone可选字符串
响应代码
- 200
- 401
响应 (200)
1{2 "app_metadata": {3 "property1": null,4 "property2": null5 },6 "aud": "lorem",7 "banned_until": "2021-12-31T23:34:00Z",8 "confirmation_sent_at": "2021-12-31T23:34:00Z",9 "confirmed_at": "2021-12-31T23:34:00Z",10 "created_at": "2021-12-31T23:34:00Z",11 "email": "lorem",12 "email_change_sent_at": "2021-12-31T23:34:00Z",13 "email_confirmed_at": "2021-12-31T23:34:00Z",14 "id": "fbdf5a53-161e-4460-98ad-0e39408d8689",15 "identities": [16 {17 "created_at": "2021-12-31T23:34:00Z",18 "id": "lorem",19 "identity_data": {20 "property1": null,21 "property2": null22 },23 "last_sign_in_at": "2021-12-31T23:34:00Z",24 "provider": "lorem",25 "updated_at": "2021-12-31T23:34:00Z",26 "user_id": "fbdf5a53-161e-4460-98ad-0e39408d8689"27 }28 ],29 "invited_at": "2021-12-31T23:34:00Z",30 "last_sign_in_at": "2021-12-31T23:34:00Z",31 "new_email": "lorem",32 "new_phone": "lorem",33 "phone": "lorem",34 "phone_change_sent_at": "2021-12-31T23:34:00Z",35 "phone_confirmed_at": "2021-12-31T23:34:00Z",36 "reauthentication_sent_at": "2021-12-31T23:34:00Z",37 "recovery_sent_at": "2021-12-31T23:34:00Z",38 "role": "lorem",39 "updated_at": "2021-12-31T23:34:00Z",40 "user_metadata": {41 "property1": null,42 "property2": null43 }44}验证注册。
post
/verify正文
- email可选字符串
- phone可选字符串
- redirect_to可选字符串
- token可选字符串
- type可选字符串