MENU
      임시 자격 증명 생성

        임시 자격 증명 생성


        기사 요약

        Classic/VPC 환경에서 이용 가능합니다.

        Secure Token Service를 사용하여 서브 계정용 임시 자격 증명을 생성합니다.

        요청

        요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

        메서드URI
        POST/api/v1/credentials

        요청 헤더

        Secure Token Service API에서 공통으로 사용하는 헤더에 대한 정보는 Secure Token Service 요청 헤더를 참조해 주십시오.

        요청 바디

        바디에 대한 설명은 다음과 같습니다.

        필드타입필수 여부설명
        durationSecIntegerOptionalAccess Key 유효 시간(초)
        • 600~43200 (기본값: 3600)
        serialNumberStringOptional시리얼 번호
        • OTP 디바이스 NRN | MFA 시리얼 번호
          • 네이버 클라우드 플랫폼 포털의 마이페이지 > 계정 관리 > 보안 설정 메뉴에서 확인 가능
        tokenCodeIntegerOptionalOTP 인증 번호

        요청 예시

        요청 예시는 다음과 같습니다.

        curl --location --request POST 'https://sts.apigw.ntruss.com/api/v1/credentials' \
        --header 'x-ncp-apigw-timestamp: {Timestamp}' \
        --header 'x-ncp-iam-access-key: {Access Key}' \
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
        --header 'Content-Type: application/json' \
        --data '{
        	"durationSec": "43200"
        }'
        Shell

        응답

        응답 형식을 설명합니다.

        응답 바디

        응답 바디에 대한 설명은 다음과 같습니다.

        필드타입필수 여부설명
        accessKeyString-Access Key
        keySecretString-Secret Key
        createTimeString-생성 일자
        • ISO 8601 형식
        expireTimeString-만료 일자
        • ISO 8601 형식
        useMfaBoolean-MFA 인증 여부
        • true | false
          • true: 인증
          • false: 인증 안 함

        응답 상태 코드

        Secure Token Service API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Secure Token Service 응답 상태 코드를 참조해 주십시오.

        응답 예시

        응답 예시는 다음과 같습니다.

        {
            "accessKey": "ncp_iam_***************",
            "keySecret": "ncp_iam_**********************",
            "createTime": "2024-10-10T16:58:28Z",
            "expireTime": "2024-10-10T17:58:28Z",
            "useMfa": false
        }
        JSON

        이 문서가 도움이 되었습니까?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.