For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data SDK

Retrieve consent-based user data

post

Check the user's consent status for consent-based user data items registered in the mini app. If the user has agreed to the latest consent terms, the actual data value is returned; if they have not yet agreed or have refused consent, a URL that can take them to the consent screen is returned instead of the data.

Business error code

The errors below respond with HTTP 200 and resultType: FAIL.

errorCode
Description

4010

Authentication information could not be found.

Authorizations
mutualTLS

This is client-certificate-based mTLS authentication issued to the partner. The mini app is identified by the certificate's CN. Refer to the Use the server API document for how to issue and manage certificates.

Header parameters
x-toss-user-keystringRequired

It's a key for authenticating users. It can be obtained through the Get user information API

Example: 12345678
Body

This is the request body for consent-based user data lookup.

consentedUserDataKeystringRequired

This is the key that identifies the consent-based user data item to look up. It is issued when the consent-based user data item is registered in the partner workspace console.

Example: cud_1234567890abcdef1234567890abcdef
Responses
200

This is the result of request processing. Use the value of resultType to distinguish between success and failure.

application/json
or
post/api-partner/v1/apps-in-toss/data-sdk/get-consented-user-data
POST /api-partner/v1/apps-in-toss/data-sdk/get-consented-user-data HTTP/1.1
Host: apps-in-toss-api.toss.im
x-toss-user-key: {userKey}
Content-Type: application/json

{
  "consentedUserDataKey": "cud_1234567890abcdef1234567890abcdef"
}
{
  "resultType": "SUCCESS",
  "success": {
    "type": "PROVIDED",
    "data": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    }
  }
}

Was this helpful?