SaaS APIInstagram OAuth
POST /ai/instagram/oauth/connect
Instagram 계정 연결
Instagram 계정 연결
프론트엔드에서 받은 authorization code로 Instagram 계정을 연결합니다.
HTTP 요청
POST /ai/instagram/oauth/connectQuery Parameters
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
code | string | 예 | Facebook에서 받은 authorization code |
state | string | 예 | OAuth URL 생성 시 포함된 state 값 |
응답
성공 응답 (200 OK)
{
"status": 200,
"code": null,
"message": "Instagram 계정이 연결되었습니다.",
"data": [
{
"accountId": 1,
"platform": 1,
"platformUserId": "17841400000000000",
"username": "my_instagram_account",
"name": "My Instagram",
"profilePictureUrl": "https://scontent.cdninstagram.com/...",
"biography": "인스타그램 소개글",
"website": "https://mywebsite.com",
"followersCount": 15000,
"followingCount": 500,
"mediaCount": 120,
"connectionStatus": "CONNECTED",
"priceTier": "B",
"price": 150000
}
]
}에러 응답
| 상태 코드 | 에러 코드 | 설명 |
|---|---|---|
400 | INSTAGRAM_OAUTH_CODE_REQUIRED | 인증 코드가 필요합니다. |
400 | INSTAGRAM_OAUTH_STATE_REQUIRED | 인증 요청 정보가 필요합니다. |
400 | INSTAGRAM_OAUTH_STATE_INVALID | state 위변조·잘림 |
400 | INSTAGRAM_BUSINESS_ACCOUNT_NOT_FOUND | 연결된 Instagram 비즈니스 계정이 없습니다. |
409 | INSTAGRAM_ACCOUNT_ALREADY_CONNECTED | 이미 다른 계정에 연동된 Instagram 계정입니다. |
502 | INSTAGRAM_UPSTREAM_FAILED | Instagram 인증에 실패했습니다. 잠시 후 다시 시도해주세요. |