User Auth API - Yapp-17th/Android_2_Backend GitHub Wiki

Base URL

http://101.101.219.23/api/login-service/

Sign up API

Request

  • url

    /v1/user/sign-up

  • method

    POST

  • header

    method parameter Description Required
    Content-Type application/json
  • request body

    {
        "userId": {{String}},
        "userName": {{String}},
        "email": {{String}},
        "accessToken": {{String}},
        "nickName": {{String}},
        "address": {{Long}},
        "category": [],
        "intro": {{Long}}
    }
    
    Field Type Description Example Required
    userId String μΉ΄μΉ΄μ˜€ν†‘μ—μ„œ λ°›μ•„μ˜€λŠ” μœ μ € oauthId O
    userName String μΉ΄μΉ΄μ˜€ν†‘μ—μ„œ λ°›μ•„μ˜€λŠ” μœ μ € 이름 O
    email String μΉ΄μΉ΄μ˜€ν†‘μ—μ„œ λ°›μ•„μ˜€λŠ” μœ μ € 이메일 O
    accessToken String 둜그인 토큰 O
    nickName String μœ μ € λ‹‰λ„€μž„(쀑볡X) O
    address Long μœ„μΉ˜ O
    category Long List 관심 μ’…λͺ© O
    intro String μžκΈ°μ†Œκ°œ O

Response

  • success response

    • header

      method parameter Description Required
      Authorization {{token}} access token O
    • body

      {
          "status": 200,
          "success": true,
          "message": "νšŒμ›κ°€μž…μ„ μΆ•ν•˜λ“œλ¦½λ‹ˆλ‹€!\nμš΄λ™ν”Œλž˜λ‹›κ³Ό κ±΄κ°•ν•œ μš΄λ™μƒν™œμ„\nμ‹œμž‘ν•΄λ³΄μ„Έμš”!"
      }
      
      Field Type Description Example Required
      status integer HTTP STATUS CODE 200 O
      success boolean 성곡 μ—¬λΆ€ true O
      message String νšŒμ›κ°€μž… 성곡 메세지 O
  • fail response

    {
        "status":{{Integer}},
        "success": {{Boolean}},
        "responseType": {{String}},
        "message": {{String}}
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 500 O
    success boolean 성곡 μ—¬λΆ€ false O
    responseType String 였λ₯˜ μ‹€νŒ¨ 메세지 "USER_NOT_FOUND" O
    message String 였λ₯˜ μ‹€νŒ¨ 메세지 "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" O
    status success ResponseType message 상황
    403 false "SUSPENDED_USER_FAIL" "μ‹ κ³ λ‘œ μ •μ§€λœ μ‚¬μš©μžμž…λ‹ˆλ‹€." μ •μ§€λœ μ‚¬μš©μžκ°€ νšŒμ› κ°€μž…μ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "SIGN_UP_DUPLICATE" "λ™μΌν•œ 이메일이 μžˆμŠ΅λ‹ˆλ‹€." 이미 같은 이메일을 가지고 μžˆλŠ” μ‚¬μš©μžκ°€ νšŒμ› κ°€μž…μ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "SIGN_UP_DUPLICATE" "이미 κ°€μž…ν•œ μœ μ €μž…λ‹ˆλ‹€." 이미 같은 카카였 accessTokenλ₯Ό 가지고 μžˆλŠ” μ‚¬μš©μžκ°€ νšŒμ› κ°€μž…μ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "SIGN_UP_DUPLICATE" "λ™μΌν•œ λ‹‰λ„€μž„μ΄ μžˆμŠ΅λ‹ˆλ‹€." 이미 같은 λ‹‰λ„€μž„μ„ 가지고 μžˆλŠ” μ‚¬μš©μžκ°€ νšŒμ› κ°€μž…μ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "SIGN_UP_DUPLICATE" "이미 κ°€μž…ν•œ μœ μ €μž…λ‹ˆλ‹€." 이미 같은 카카였 oauthIdλ₯Ό μ‚¬μš©μžκ°€ νšŒμ› κ°€μž…μ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "INVALID_METHOD" "λ©”μ†Œλ“œ μœ ν˜•μ΄ 잘λͺ» λ˜μ—ˆμŠ΅λ‹ˆλ‹€." POSTκ°€ μ•„λ‹Œ λ‹€λ₯Έ λ©”μ†Œλ“œλ‘œ μš”μ²­ν•œ 경우
    500 false "INTERNAL_SERVER_ERROR" "μ„œλ²„ λ‚΄λΆ€ 였λ₯˜" μ„œλ²„ λ‚΄λΆ€ 였λ₯˜

Login API

Request

  • url

    /v1/user/sign-in

  • method

    POST

  • header

    method parameter Description Required
    Content-Type application/json
  • request body

    {
        "userId": {{String}},
        "email": {{String}},
        "accessToken": {{String}},
        "nickName": {{String}}
    }
    
    Field Type Description Example Required
    userId String μΉ΄μΉ΄μ˜€ν†‘μ—μ„œ λ°›μ•„μ˜€λŠ” μœ μ € oauthId O
    email String μΉ΄μΉ΄μ˜€ν†‘μ—μ„œ λ°›μ•„μ˜€λŠ” μœ μ € 이메일
    accessToken String 둜그인 토큰 O
    nickName String μœ μ € λ‹‰λ„€μž„(쀑볡X)

Response

  • success response

    {
        "status": 200,
        "success": true,
        "message": "둜그인 성곡"
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 200 O
    success boolean 성곡 μ—¬λΆ€ true O
    message String νšŒμ›κ°€μž… 성곡 메세지 O
  • fail response

    {
        "status":{{Integer}},
        "success": {{Boolean}},
        "responseType": {{String}},
        "message": {{String}}
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 500 O
    success boolean 성곡 μ—¬λΆ€ false O
    responseType String 였λ₯˜ μ‹€νŒ¨ 메세지 "USER_NOT_FOUND" O
    message String 였λ₯˜ μ‹€νŒ¨ 메세지 "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" O
    status success ResponseType message 상황
    404 false "USER_NOT_FOUND" "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" 둜그인 μ‹œ ν•΄λ‹Ή 정보λ₯Ό 가진 μ‚¬μš©μžκ°€ 없을 경우
    401 false "INACTIVE_USER_FAIL" "νšŒμ› κ°€μž…μ΄ ν•„μš”ν•©λ‹ˆλ‹€." νƒˆν‡΄ν•œ μ‚¬μš©μžκ°€ λ‘œκ·ΈμΈμ„ μ‹œλ„ν–ˆμ„ 경우
    403 false "SUSPENDED_USER_FAIL" "μ‹ κ³ λ‘œ μ •μ§€λœ μ‚¬μš©μžμž…λ‹ˆλ‹€." μ •μ§€λœ μ‚¬μš©μžκ°€ λ‘œκ·ΈμΈμ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "INVALID_METHOD" "λ©”μ†Œλ“œ μœ ν˜•μ΄ 잘λͺ» λ˜μ—ˆμŠ΅λ‹ˆλ‹€." POSTκ°€ μ•„λ‹Œ λ‹€λ₯Έ λ©”μ†Œλ“œλ‘œ μš”μ²­ν•œ 경우
    500 false "INTERNAL_SERVER_ERROR" "μ„œλ²„ λ‚΄λΆ€ 였λ₯˜" μ„œλ²„ λ‚΄λΆ€ 였λ₯˜

auto Login API

Request

  • url

    /v1/user/auto-in

  • method

    GET

  • header

    method parameter Description Required
    Authorization {{token}} access token O

Response

  • success response

    {
        "status": 200,
        "success": true,
        "message": "둜그인 성곡"
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 200 O
    success boolean 성곡 μ—¬λΆ€ true O
    message String νšŒμ›κ°€μž… 성곡 메세지 O
  • fail response

    {
        "status":{{Integer}},
        "success": {{Boolean}},
        "responseType": {{String}},
        "message": {{String}}
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 500 O
    success boolean 성곡 μ—¬λΆ€ false O
    responseType String 였λ₯˜ μ‹€νŒ¨ 메세지 "USER_NOT_FOUND" O
    message String 였λ₯˜ μ‹€νŒ¨ 메세지 "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" O
    status success ResponseType message 상황
    404 false "USER_NOT_FOUND" "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" 둜그인 μ‹œ ν•΄λ‹Ή 정보λ₯Ό 가진 μ‚¬μš©μžκ°€ 없을 경우
    401 false "INACTIVE_USER_FAIL" "νšŒμ› κ°€μž…μ΄ ν•„μš”ν•©λ‹ˆλ‹€." νƒˆν‡΄ν•œ μ‚¬μš©μžκ°€ λ‘œκ·ΈμΈμ„ μ‹œλ„ν–ˆμ„ 경우
    403 false "SUSPENDED_USER_FAIL" "μ‹ κ³ λ‘œ μ •μ§€λœ μ‚¬μš©μžμž…λ‹ˆλ‹€." μ •μ§€λœ μ‚¬μš©μžκ°€ λ‘œκ·ΈμΈμ„ μ‹œλ„ν–ˆμ„ 경우
    400 false "INVALID_METHOD" "λ©”μ†Œλ“œ μœ ν˜•μ΄ 잘λͺ» λ˜μ—ˆμŠ΅λ‹ˆλ‹€." POSTκ°€ μ•„λ‹Œ λ‹€λ₯Έ λ©”μ†Œλ“œλ‘œ μš”μ²­ν•œ 경우
    500 false "INTERNAL_SERVER_ERROR" "μ„œλ²„ λ‚΄λΆ€ 였λ₯˜" μ„œλ²„ λ‚΄λΆ€ 였λ₯˜

Sign out API

Reqeust

  • url

    /v1/user/withdraw

  • method

    DELETE

  • header

    method parameter Description Required
    Authorization {{token}} access token O

Response

  • success response

    • body
      {
          "status": 200,
          "success": true,
          "message": "μ‚¬μš©μž μ‚­μ œ 성곡"
      }
      
    Field Type Description Example Required
    status integer HTTP STATUS CODE 200 O
    success boolean 성곡 μ—¬λΆ€ true O
    message String μœ μ € μ‚­μ œ 성곡 메세지 O
  • fail response

    {
        "status":{{Integer}},
        "success": {{Boolean}},
        "responseType": {{String}},
        "message": {{String}}
    }
    
    Field Type Description Example Required
    status integer HTTP STATUS CODE 500 O
    success boolean 성곡 μ—¬λΆ€ false O
    responseType String 였λ₯˜ μ‹€νŒ¨ 메세지 "USER_NOT_FOUND" O
    message String 였λ₯˜ μ‹€νŒ¨ 메세지 "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" O
    status success ResponseType message 상황
    404 false "USER_NOT_FOUND" "μ‚¬μš©μžλ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€" νƒˆν‡΄ μ‹œ ν•΄λ‹Ή 정보λ₯Ό 가진 μ‚¬μš©μžκ°€ 없을 경우
    401 false "INACTIVE_USER_FAIL" "νšŒμ› κ°€μž…μ΄ ν•„μš”ν•©λ‹ˆλ‹€." νƒˆν‡΄ν•œ μ‚¬μš©μžκ°€ νƒˆν‡΄λ₯Ό μ‹œλ„ν–ˆμ„ 경우
    403 false "SUSPENDED_USER_FAIL" "μ‹ κ³ λ‘œ μ •μ§€λœ μ‚¬μš©μžμž…λ‹ˆλ‹€." μ •μ§€λœ μ‚¬μš©μžκ°€ νƒˆν‡΄λ₯Ό μ‹œλ„ν–ˆμ„ 경우
    400 false "INVALID_REQUEST_BODY" "μ •ν™•ν•œ 값을 Request Body에 λ‹΄μ•„μ„œ μš”μ²­ν•˜μ‹œκΈ° λ°”λžλ‹ˆλ‹€" 둜그인 μ‹œ μš”μ²­ request bodyκ°€ μ˜¬λ°”λ₯΄μ§€ μ•Šμ€ 경우
    400 false "INVALID_METHOD" "λ©”μ†Œλ“œ μœ ν˜•μ΄ 잘λͺ» λ˜μ—ˆμŠ΅λ‹ˆλ‹€." POSTκ°€ μ•„λ‹Œ λ‹€λ₯Έ λ©”μ†Œλ“œλ‘œ μš”μ²­ν•œ 경우
    400 false "INVALID_METHOD" "λ©”μ†Œλ“œ μœ ν˜•μ΄ 잘λͺ» λ˜μ—ˆμŠ΅λ‹ˆλ‹€." POSTκ°€ μ•„λ‹Œ λ‹€λ₯Έ λ©”μ†Œλ“œλ‘œ μš”μ²­ν•œ 경우
    500 false "INTERNAL_SERVER_ERROR" "μ„œλ²„ λ‚΄λΆ€ 였λ₯˜" μ„œλ²„ λ‚΄λΆ€ 였λ₯˜