회원가입 - Willson-2019/Willson-Server GitHub Wiki

URL

[POST] ~/api/v1/asker/sign/signup

REQUEST PARAMETER NAME DESCRIPTION
header Content-Type application-json
body token id 토큰 : String
body email 이메일 : String
body gender 성별 : ENUM("M", "F")
body age 나이 : String("YYYY") ex.1997
body nickname 닉네임 : String
body social 소셜타입 : ENUM("email", "kakao", "facebook")
body platform 기기 플랫폼 : ENUM("ios", "android")
body push_token 푸시토큰 : String

응답예시

성공

{
    "code": "success",
    "message": "success",
    "data": {
        "age": "30대 초반",
        "login_at": 1583300483000,
        "created_at": 1583300483482,
        "updated_at": 1583300483482,
        "status": "inactive",
        "idx": 38,
        "email": "[email protected]",
        "gender": "F",
        "nickname": "하이하이",
        "social": "email",
        "id": "nKYHjlI9yneHWlhbyAObhPvXDw43",
        "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjM4LCJlbWFpbCI6ImJhYm9Aa2FrYW8uZnVuIiwiZ2VuZGVyIjoiRiIsImFnZSI6IjMw64yAIOy0iOuwmCIsIm5pY2tuYW1lIjoi7ZWY7J207ZWY7J20IiwibG9naW5fYXQiOjE1ODMzMDA0ODMwMDAsImlhdCI6MTU4MzMwMDQ4MywiZXhwIjoxNTgzNDA4NDgzfQ.Wln7Gwey85BIMzaaudivH7tEKPa5e3v7BfcafWrZ4ls",
        "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjM4LCJpYXQiOjE1ODMzMDA0ODMsImV4cCI6MTU4NDUxMDA4M30.Rm_4cZMISUOJgSaYZqf00AEqboql0zhdeJn7GVWSMnE"
    }
}

이미 존재하는 유저인 경우

{
    "code": "user_already_exist",
    "message": "User already exist."
}

나이가 45세 이상 혹은 미성년자인 경우

  • age : 1970
{
    "code": "out_of_range:1970",
    "message": "The value '1970' is out of range."
}
  • age : 2004
{
    "code": "out_of_range:2004",
    "message": "The value '2004' is out of range."
}

firebase 인증 실패

{
    "code": "token_auth_failed",
    "message": "Token authentication failed"
}

서버 통신 에러

{
    "code": "transaction_error",
    "message": "?"
}

카카오 통신 에러

{
    "code": "kakao_error",
    "message": "Kakao StatusCodeError: 400 - {\"msg\":\"too long for access token.\",\"code\":-2}"
}

소셜 타입이 잘못된 경우

{
    "code": "invalid_social_type",
    "message": "Social type is invalid."
}

탈퇴 회원인 경우

{
    "code": "deleted_account",
    "message": "Account is deleted."
}