체커블 OAuth2 API로 서비스를 연동해보세요
https://checkable.app/auth/member/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code&scope=all&state=YOUR_STATE
YOUR_REDIRECT_URI?code=AUTHORIZATION_CODE&state=YOUR_STATE
POST /api/auth/member/oauth2/token HTTP/1.1 Host: checkable.app Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& client_id=YOUR_CLIENT_ID& code=AUTHORIZATION_CODE& redirect_uri=YOUR_REDIRECT_URI
{ "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refresh_token_expires_in": 2592000, "scope": "all" }
GET /api/auth/member/oauth2/me HTTP/1.1 Host: checkable.app Authorization: Bearer ACCESS_TOKEN
{ "member": { "id": 123, "name": "discord_username", "email": "user@example.com" } }
POST /api/public/challenges HTTP/1.1 Host: checkable.app Authorization: Bearer ACCESS_TOKEN Content-Type: application/json
{ "challenges": [ { "uuid": "challenge-uuid", "title": "챌린지 제목", "guildName": "디스코드 서버명", "channelName": "채널명", "discordChannelId": "123456789", "discordMessageId": "987654321" } ] }
POST /api/public/challenges/{challengeUuid}/upload-message HTTP/1.1 Host: checkable.app Authorization: Bearer ACCESS_TOKEN Content-Type: application/json { "message": "오늘 운동 완료!", "imageData": "base64-encoded-image-data" }
{ "messageId": "discord-message-id" }