---
title: "Retrieve a user's social identity and associated token storage ."
method: GET
path: "/api/users/{userId}/identities/{target}"
tags: ["Users"]
---

# Retrieve a user's social identity and associated token storage .

`GET /api/users/{userId}/identities/{target}`

This API retrieves the social identity and its associated token set for the specified user from the Logto Secret Vault. The token set will only be available if token storage is enabled for the corresponding social connector.

## Path parameters

- `userId` string, required
- `target` string, required

## Query parameters

- `includeTokenSecret` string

## Response `200`

Returns the user's social identity and associated token storage.

- object
  - `identity` object, required — The user's social identity.
    - `userId` string, required
    - `details` object — arbitrary
  - `tokenSecret` object — The desensitized token set secret associated with the user's social identity. This field is included only if the `includeTokenSecret` query parameter is provided and the corresponding connector has token storage enabled.
    - `tenantId` string, required
    - `id` string, required
    - `userId` string, required
    - `type` string, "federated_token_set", required
    - `metadata` object, required
      - `scope` string
      - `expiresAt` number
      - `tokenType` string
      - `hasRefreshToken` boolean, required
    - `createdAt` number, required
    - `updatedAt` number, required
    - `connectorId` string, required
    - `identityId` string, required
    - `target` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — User social identity not found.

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
