---
title: "Get Data Subject Token"
method: GET
path: "/rest/api/consent/v4/datasubjects/linktokens"
tags: ["Magic Link Tokens V4"]
---

# Get Data Subject Token

`GET /rest/api/consent/v4/datasubjects/linktokens`

## Request

- Base URL: `https://hostname`
- URL: `https://hostname/rest/api/consent/v4/datasubjects/linktokens`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://{hostname}/api/access/v1/oauth/token` scopes: `CONSENT`

Use this API to retrieve the link token for a specific data subject.

## Headers

- `identifier` string, required

## Response `200`

OK

- ConsentAPIEmailLinkTokenResponseDto
  - `token` string: The data subject link token. This token can be appended to the preference center URL to form the preference center magic link.
  - `identifier` string: The data subject identifier of the data subject.
  - `createdDate` string, date-time: The date and time that the data subject link token was created.
  - `expiryDate` string, date-time: The date and time that the data subject link token expires.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500`: Internal Server Error

---

[API](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management.md) - [All operations](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/llms.txt) - [OpenAPI document](https://skmtc.dev/onetrust/apis/consent-preferences-universal-consent-preference-management/revisions/fe4a0697ec9d?raw)
