| Base URL | https://3-37-186-61.nip.io |
| Swagger UI | https://3-37-186-61.nip.io/swagger-ui.html |
| Health check | https://3-37-186-61.nip.io/actuator/health |
accessToken이 내려옵니다. localStorage 등에 저장하세요.# 1. 가입
curl -X POST <https://3-37-186-61.nip.io/api/auth/signup> \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"password123"}'
# 2. 로그인 → accessToken 획득
curl -X POST <https://3-37-186-61.nip.io/api/auth/login> \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"password123"}'
# 3. 토큰으로 메모 목록 조회
curl <https://3-37-186-61.nip.io/api/memos> \
-H 'Authorization: Bearer {accessToken}'
Swagger UI에서도 똑같이 테스트할 수 있습니다. 로그인으로 받은 토큰을 우측 상단 Authorize 버튼에 넣어두면 이후 요청에 헤더가 자동으로 붙습니다.
성공·실패 관계없이 항상 같은 3개 키로 내려옵니다.
성공:
{
"success": true,
"data": { },
"message": null
}
실패:
{
"success": false,
"data": null,
"message": "메모를 찾을 수 없습니다."
}
message는 사용자에게 그대로 보여줘도 되는 한국어 문장입니다. 토스트나 입력창 아래 에러 문구로 쓰시면 됩니다.
/api/auth/**를 제외한 모든 요청에 헤더가 필요합니다.
Authorization: Bearer eyJhbGciOiJIUzM4NCJ9...