Autional Autional
API Reference GitHub autional.com →

POST /oauth/bind

Binds the current user's AuthMS account to a third-party OAuth provider account. Requires JWT authentication; user_id in request body must match JWT subject.

OAuth `bearerAuth` application/json

Request Body

Schema: dto.BindOAuthRequest

FieldTypeRequiredExampleConstraintsDescription
access_token string Yes
provider string Yes
provider_user_id string Yes
user_id string Yes
profile_data object No
refresh_token string No

Responses

StatusDescriptionSchema
201Binding successfuldto.DataResponse-dto_OAuthBindData
400Invalid request parametersgitee_com_linmes_authms_base_dto.SimpleResponse
401Unauthenticatedgitee_com_linmes_authms_base_dto.SimpleResponse
403user_id does not match JWTgitee_com_linmes_authms_base_dto.SimpleResponse
409Already bound to this providergitee_com_linmes_authms_base_dto.SimpleResponse
500Internal server errorgitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.DataResponse-dto_OAuthBindData

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.OAuthBindData No
message string No
timestamp string No

dto.OAuthBindData

FieldTypeRequiredExampleConstraintsDescription
connection dto.OAuthConnectionItem No

dto.OAuthConnectionItem

FieldTypeRequiredExampleConstraintsDescription
created_at string No 2026-04-15T10:30:00Z
id string No conn_abc123
profile_data object No
provider_id string No github
provider_user_id string No 12345678
tenant_id string No tenant_abc123
token_expiry string No 2026-04-15T10:30:00Z
updated_at string No 2026-04-15T10:30:00Z
user_id string No usr_abc123

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No