친구 추가 - DevCamp2Flame/FlameTalk_Server GitHub Wiki
Friend create API
Request
Method
POST
URL
/api/membership/friend
Header
Method |
Parameter |
Description |
Content-Type |
application/json |
|
token |
{token} |
access token값 |
Body
Field |
Type |
Description |
Required |
profileId |
Long |
유저가 친구에게 보여줄 프로필 ID |
Y |
phoneNumber |
String |
친구로 추가할 유저의 핸드폰 번호. 13 글자 고정 |
Y |
Response
Header
Method |
Parameter |
Description |
statusCode |
{statusCode} |
|
Body
Field |
Type |
Description |
code |
Integer |
응답 코드 |
message |
String |
응답 메세지 |
data |
Object |
data 참고 |
data
Field |
Type |
Description |
friendId |
Long |
친구 id |
friendNickname |
String |
친구 유저의 닉네임 |
profileId |
Long |
친구 유저의 오픈 프로필 id |
imageUrl |
String |
친구 유저의 프로필 사진 S3 URL |
description |
String |
친구 유저의 상태 메세지 |
SUCCESS example
{
"status": 200,
"messsage": "친구 생성 성공"
"data": {
"friendId": 12,
"friendNickname": "팀장 파크소연",
"profileId": 2,
"imageUrl": "https://s3sopt25.s3.ap-northeast-2.amazonaws.com/1577892544930.png",
"description": "열정!열정!열정!"
}
}
Error Code
Code |
Error Messsage |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Server Error |
FAIL example
{
"status": 404,
"message": "존재하지 않는 유저는 친구로 추가할 수 없습니다.",
"error": "NOT_FOUND",
"code": "FRIEND_USER_NOT_FOUND",
"timestamp": "2022-01-18T19:30:16.3072905"
}