> For the complete documentation index, see [llms.txt](https://developers-apps-in-toss.toss.im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-apps-in-toss.toss.im/api/sdk.md).

# 데이터 SDK

## 동의 기반 사용자 데이터 조회하기

> 미니앱에 등록된 동의 기반 사용자 데이터 항목의 사용자 동의 상태를 확인해요. 사용자가 최신 동의 내용에 동의했다면 실제 데이터 값을 반환하고, 아직 동의하지 않았거나 동의를 거부한 경우에는 데이터 대신 \`type\`으로 미동의·거부 상태를 알려줘요. 동의 화면 안내는 미니앱에서 해주세요.\
> \
> \### 비즈니스 오류 코드\
> \
> 아래 오류는 HTTP 200과 \`resultType: FAIL\`로 응답해요.\
> \
> \| errorCode | 설명 |\
> \| --- | --- |\
> \| \`4010\` | 인증 정보를 찾을 수 없어요. |\
> \| \`4095\` | 요청 한도를 초과했습니다. 잠시 후 다시 시도해주세요. |\
> \
> \*\*요청 한도\*\*: 앱당 분당 3,000회

```json
{"openapi":"3.1.0","info":{"title":"Apps in Toss 파트너 API","version":"1.0.0"},"tags":[{"description":"파트너가 사용자의 동의를 받은 개인정보를 조회할 때 사용하는 API예요.","name":"sdk"}],"servers":[{"description":"운영 (간편 로그인·메시지 발송·토스 포인트 지급 등)","url":"https://apps-in-toss-api.toss.im"}],"security":[{"mutualTLS":[]}],"components":{"securitySchemes":{"mutualTLS":{"description":"파트너에게 발급된 클라이언트 인증서 기반 mTLS 인증이에요. 인증서의 CN으로 미니앱을 식별해요. 인증서 발급·관리 방법은 [서버 API 이용하기](https://developers-apps-in-toss.toss.im/documentation/integration/server-api) 문서를 참고하세요.","type":"mutualTLS"}},"schemas":{"DataSdkConsentedUserDataRequest":{"description":"동의 기반 사용자 데이터 조회 요청 본문이에요.","properties":{"consentedUserDataKey":{"description":"조회할 동의 기반 사용자 데이터 항목을 식별하는 키예요. 파트너 워크스페이스 콘솔에서 동의 기반 사용자 데이터 항목을 등록하면 발급돼요.","type":"string"}},"required":["consentedUserDataKey"]},"TossApiSuccessDataSdkPartnerConsentedUserDataResponse":{"description":"성공 응답 봉투예요.","properties":{"resultType":{"description":"처리 결과예요. 성공이면 `SUCCESS`예요.","enum":["SUCCESS"],"type":"string"},"success":{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"}},"required":["resultType","success"],"type":"object"},"DataSdkPartnerConsentedUserDataResponse":{"description":"동의 기반 사용자 데이터 조회 결과예요. 사용자가 동의했을 때만 `data`가 내려오고, 그 밖에는 `type`으로 데이터를 제공하지 않은 이유를 알려줘요.","discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/Provided"},{"$ref":"#/components/schemas/UserNotConsented"},{"$ref":"#/components/schemas/UserDeclined"},{"$ref":"#/components/schemas/TermsNotSet"},{"$ref":"#/components/schemas/Unavailable"}],"properties":{"type":{"description":"응답 결과의 종류를 나타내는 판별자예요.","enum":["PROVIDED","USER_NOT_CONSENTED","USER_DECLINED","TERMS_NOT_SET","UNAVAILABLE"],"type":"string"}},"required":["type"]},"Provided":{"allOf":[{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"},{"properties":{"data":{"additionalProperties":{"type":"string"},"description":"동의한 데이터 항목의 실제 값이에요. 키는 데이터 항목(DataScopeKey), 값은 문자열이에요. USER_ADDRESS를 제공하면 주소(USER_ADDRESS_BASE)와 상세주소(USER_ADDRESS_DETAIL)도 나눠서 함께 내려줘요. 값이 없는 항목은 키가 빠져요.","type":"object"}},"type":"object"}],"description":"사용자가 최신 동의 내용에 동의해서, 요청한 항목의 실제 데이터 값을 제공하는 응답이에요.","required":["data","type"]},"UserNotConsented":{"allOf":[{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"}],"description":"사용자가 아직 최신 동의 내용에 동의하지 않아 데이터를 제공하지 않았어요.","required":["type"]},"UserDeclined":{"allOf":[{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"}],"description":"사용자가 동의를 거부해서 데이터를 제공하지 않았어요.","required":["type"]},"TermsNotSet":{"allOf":[{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"}],"description":"동의 약관이 아직 설정되지 않아 사용자의 동의 여부를 확인할 수 없는 상태예요.","required":["type"]},"Unavailable":{"allOf":[{"$ref":"#/components/schemas/DataSdkPartnerConsentedUserDataResponse"}],"description":"일시적인 오류 등으로 사용자의 동의 상태를 확인할 수 없는 상태예요.","required":["type"]},"TossApiFail":{"description":"실패 응답 봉투예요. 비즈니스 오류는 HTTP 200으로 응답하니 `resultType`을 반드시 확인하세요.","properties":{"error":{"$ref":"#/components/schemas/TossApiError"},"resultType":{"description":"처리 결과예요. `SUCCESS`가 아닌 값은 모두 실패로 처리하세요. 일반적으로 `FAIL`이에요.","enum":["FAIL","HTTP_TIMEOUT","NETWORK_ERROR","EXECUTION_FAIL","INTERRUPTED","INTERNAL_ERROR"],"type":"string"},"success":{"description":"실패 시 항상 null이에요."}},"required":["error","resultType"],"type":"object"},"TossApiError":{"description":"오류 상세 정보예요.","properties":{"data":{"description":"오류 부가 정보예요. 요청 한도 초과 시 `retryAfterSeconds`가 담겨요.","type":"object"},"errorCode":{"description":"오류 코드예요. 각 API의 비즈니스 오류 코드 표를 참고하세요.","type":"string"},"errorType":{"description":"내부 오류 분류 값이에요. 오류 구분에는 `errorCode`를 사용하세요.","format":"int32","type":"integer"},"reason":{"description":"사람이 읽을 수 있는 오류 설명이에요.","type":"string"},"title":{"description":"오류 제목이에요. 대부분 null이에요.","type":"string"}},"required":["errorCode","reason"],"type":"object"},"TossApiValidationFail":{"description":"요청 필드 검증에 실패했을 때의 응답이에요.","properties":{"error":{"$ref":"#/components/schemas/TossApiValidationFailError"},"resultType":{"description":"처리 결과예요. `SUCCESS`가 아닌 값은 모두 실패로 처리하세요. 일반적으로 `FAIL`이에요.","enum":["FAIL","HTTP_TIMEOUT","NETWORK_ERROR","EXECUTION_FAIL","INTERRUPTED","INTERNAL_ERROR"],"type":"string"},"success":{"description":"실패 시 항상 null이에요."}},"required":["error","resultType"],"type":"object"},"TossApiValidationFailError":{"description":"오류 상세 정보예요.","properties":{"data":{"description":"오류 부가 정보예요. 요청 한도 초과 시 `retryAfterSeconds`가 담겨요.","properties":{"errorDetails":{"description":"필드별 검증 실패 상세 목록이에요.","items":{"$ref":"#/components/schemas/TossApiFieldError"},"type":"array"}},"type":"object"},"errorCode":{"description":"오류 코드예요. 각 API의 비즈니스 오류 코드 표를 참고하세요.","type":"string"},"errorType":{"description":"내부 오류 분류 값이에요. 오류 구분에는 `errorCode`를 사용하세요.","format":"int32","type":"integer"},"reason":{"description":"사람이 읽을 수 있는 오류 설명이에요.","type":"string"},"title":{"description":"오류 제목이에요. 대부분 null이에요.","type":"string"}},"required":["errorCode","reason"],"type":"object"},"TossApiFieldError":{"description":"필드별 검증 실패 상세 목록이에요.","properties":{"field":{"description":"검증에 실패한 필드 이름이에요.","type":"string"},"message":{"description":"검증 실패 사유예요.","type":"string"},"rejectedValue":{"description":"거부된 입력 값이에요."}},"type":"object"}}},"paths":{"/api-partner/v1/apps-in-toss/data-sdk/get-consented-user-data":{"post":{"description":"미니앱에 등록된 동의 기반 사용자 데이터 항목의 사용자 동의 상태를 확인해요. 사용자가 최신 동의 내용에 동의했다면 실제 데이터 값을 반환하고, 아직 동의하지 않았거나 동의를 거부한 경우에는 데이터 대신 `type`으로 미동의·거부 상태를 알려줘요. 동의 화면 안내는 미니앱에서 해주세요.\n\n### 비즈니스 오류 코드\n\n아래 오류는 HTTP 200과 `resultType: FAIL`로 응답해요.\n\n| errorCode | 설명 |\n| --- | --- |\n| `4010` | 인증 정보를 찾을 수 없어요. |\n| `4095` | 요청 한도를 초과했습니다. 잠시 후 다시 시도해주세요. |\n\n**요청 한도**: 앱당 분당 3,000회","operationId":"getConsentedUserData","parameters":[{"description":"사용자를 인증하기 위한 키예요. [사용자 정보 받기](https://developers-apps-in-toss.toss.im/api/toss-login#get-api-partner-v1-apps-in-toss-user-oauth2-login-me) API를 통해 획득할 수 있어요","in":"header","name":"x-toss-user-key","required":false,"schema":{"type":"string"}},{"description":"사용자를 인증하기 위한 키예요. 미니앱 SDK의 [User.getAnonymousKey](https://developers-apps-in-toss.toss.im/documentation/sdk/domains-api/user/user.getanonymouskey) 함수로 발급받을 수 있어요","in":"header","name":"x-anon-key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSdkConsentedUserDataRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"discriminator":{"mapping":{"FAIL":"#/components/schemas/TossApiFail","SUCCESS":"#/components/schemas/TossApiSuccessDataSdkPartnerConsentedUserDataResponse"},"propertyName":"resultType"},"oneOf":[{"$ref":"#/components/schemas/TossApiSuccessDataSdkPartnerConsentedUserDataResponse"},{"$ref":"#/components/schemas/TossApiFail"}]}}},"description":"요청 처리 결과예요. `resultType` 값으로 성공/실패를 구분하세요."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TossApiValidationFail"}}},"description":"요청 본문이 형식에 맞지 않아요. `error.data.errorDetails`에서 필드별 상세를 확인하세요."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TossApiFail"}}},"description":"분류되지 않은 서버 오류예요. 계속 실패하면 파트너 지원 채널로 문의해 주세요."}},"summary":"동의 기반 사용자 데이터 조회하기","tags":["sdk"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers-apps-in-toss.toss.im/api/sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
