curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope={ASSIGNED_SCOPE}"
curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"grant_type": "client_credentials",
"scope": "{ASSIGNED_SCOPE}"
}'
{
"rspCode": "A0000",
"rspMessage": "정상",
"access_token": "{ACCESS_TOKEN}",
"token_type": "bearer",
"expires_in": 3599,
"scope": "{ASSIGNED_SCOPE}",
"jti": "550e8400-e29b-41d4-a716-446655440000"
}
{
"rspCode": "A7773",
"rspMessage": "등록된 기관정보가 없습니다."
}
인증
토큰 발행
Client ID와 Client Secret으로 Dayfin API 호출에 필요한 Access Token을 발급받는 토큰 발행 API의 요청 및 응답 명세입니다.
POST
/
oauth
/
token
curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope={ASSIGNED_SCOPE}"
curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"grant_type": "client_credentials",
"scope": "{ASSIGNED_SCOPE}"
}'
{
"rspCode": "A0000",
"rspMessage": "정상",
"access_token": "{ACCESS_TOKEN}",
"token_type": "bearer",
"expires_in": 3599,
"scope": "{ASSIGNED_SCOPE}",
"jti": "550e8400-e29b-41d4-a716-446655440000"
}
{
"rspCode": "A7773",
"rspMessage": "등록된 기관정보가 없습니다."
}
Client Credentials 방식으로 Access Token을 발급합니다. 발급받은 토큰은
Authorization: Bearer {ACCESS_TOKEN} 헤더에 담아 API를 호출할 때 사용합니다. 전체 이용 절차는 토큰 발급 및 이용 안내를 참고하세요.
인증
HTTP Basic 인증을 사용합니다. Client ID와 Client Secret을:로 연결한 뒤 Base64로 인코딩하여 전달합니다.
Authorization: Basic Base64({CLIENT_ID}:{CLIENT_SECRET})
요청 헤더
string
required
Basic Base64(Client ID:Client Secret)string
required
application/x-www-form-urlencoded 권장 (application/json도 지원)string
application/json요청 파라미터
string
required
client_credentials 고정string
required
계약 시 할당받은 Scope
응답 필드
string
처리 결과 코드. 성공 시
A0000string
처리 결과 메시지
string
API 호출에 사용할 Access Token (JWT)
string
토큰 타입.
bearernumber
토큰의 남은 유효시간(초)
string
요청한 Scope
string
발급된 토큰의 고유 식별자
expires_in은 고객사별 설정에 따라 달라질 수 있습니다. 고정값을 사용하지 말고 응답값을 기준으로 만료 시점을 계산해 주세요. Refresh Token은 제공되지 않으므로 만료 전에 이 API를 다시 호출해 새 토큰을 받아 주세요.오류 코드
| HTTP 상태 | rspCode | 발생 조건 |
|---|---|---|
| 401 | A7771 | grant_type 누락 |
| 401 | A7772 | scope 누락 |
| 401 | A7773 | Client ID 또는 Client Secret 불일치 |
| 401 | A7774 | 허용되지 않은 Scope |
| 401 | A7775 | 허용되지 않은 Grant Type |
| 401 | A1015 | 등록되지 않은 IP에서 요청 |
| 500 | A7779 | 토큰 생성 실패 |
| 500 | A1002 | 요청 처리 중 서버 오류 |
curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope={ASSIGNED_SCOPE}"
curl --request POST \
--url "https://api.dayfin.io/oauth/token" \
--user "{CLIENT_ID}:{CLIENT_SECRET}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"grant_type": "client_credentials",
"scope": "{ASSIGNED_SCOPE}"
}'
{
"rspCode": "A0000",
"rspMessage": "정상",
"access_token": "{ACCESS_TOKEN}",
"token_type": "bearer",
"expires_in": 3599,
"scope": "{ASSIGNED_SCOPE}",
"jti": "550e8400-e29b-41d4-a716-446655440000"
}
{
"rspCode": "A7773",
"rspMessage": "등록된 기관정보가 없습니다."
}

