Signup
일반 가입의 경우, email, password1, password2, nickname을 받아 User object를 생성합니다.
URL
/auth/signup/
Method
POST
Data Params
Key | Description | Type | Require |
---|---|---|---|
email 입력. {@}, {.} 으로 유효성 판단. ex) [email protected] | String | True | |
nickname | 중복 사용 불가 | String | True |
password1 | 패스워드 입력 | String | True |
password2 | 패스워드 재입력 확인 | String | True |
image | 프로필 이미지 | Image File (jpg, jpeg, png, gif..) | False |
Success response
HTTP Status code201
content
{
"message": "Please check a membership verification email from your account.",
"user": {
"pk": 11,
"user_type": "d", # "d" 일반 메일로 가입한 유저타입
"email": "[email protected]", # 생성된 email, nickname을 띄움
"nickname": "petuser1",
"is_active": false,
"date_joined": "2017-11-29T16:26:07.611336+09:00"
"image": "https://{domain}static/placeholder/placeholder_human.png"
}
}
그 후 입력한 이메일로 회원가입 인증 이메일이 발송됩니다.
[Wooltari] 가입 인증 이메일
회원가입 인증 절차를 위해 아래 링크를 클릭해주세요.
Activate
Activate
버튼을 클릭하면 웹브라우저에 새 창이 뜨면서 회원 활성화 화면이 나옵니다.
{
"token": "7bde326d0ade9a974a2e589cdd3fddb5608a304e",
"user": {
"pk": 11,
"user_type": "d",
"email": "[email protected]",
"nickname": "petuser1",
"is_active": true, # 회원 활성화
"date_joined": "2017-11-29T16:26:07.611336+09:00"
"image": "https://{domain}static/placeholder/placeholder_human.png"
}
}
Error response
HTTP Status code
400
content
# 필수 값을 (email, nickname, password1, password2) 누락했을 경우
{
"email": [
"This field may not be blank."
],
"nickname": [
"This field may not be blank."
],
"password1": [
"This field may not be blank."
],
"password2": [
"This field may not be blank."
]
}
# password1 ≠ password2 : 패스워드가 틀렸을 경우
{
"non_field_errors": [
"Passwords do not match"
]
}
# 이미 존재하는 email을 입력한 경우
{
"email": [
"This field must be unique."
]
}
# 이미 존재하는 nickname을 입력한 경우
{
"nickname": [
"User with this nickname already exists."
]
}
# 이메일 주소 형식이 아닌 경우 ex) {"email" : "jskim2code" }
## ex) {"email": "[email protected]"}은 이메일 주소 형식에 해당함
{
"email": [
"Enter a valid email address."
]
}
HTTP Status code
413 Request Entity Too Large
Content
/*1MB 이상의 이미지가 업로드될 경우 */
<html>
<head>
<title>413 Request Entity Too Large</title>
</head>
<body bgcolor="white">
<center>
<h1>413 Request Entity Too Large</h1>
</center>
<hr>
<center>nginx/1.12.1</center>
</body>
</html>