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 - body
-
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" "μλ² λ΄λΆ μ€λ₯" μλ² λ΄λΆ μ€λ₯