Logto API references
Cloud

API references for Logto services. To learn more about how to interact with Logto APIs, see Interact with Management API.

Note: The documentation is for Logto Cloud. If you are using Logto OSS, please refer to the response of /api/swagger.json endpoint on your Logto instance.

This is the documentation for version Cloud of the API. Last update on Apr 26, 2024.

Base URL
https://[tenant_id].logto.app

Get user

GET /api/users/{userId}

Get user data for the given ID.

Path parameters

  • userId string Required

    The unique identifier of the user.

Query parameters

  • If it's provided with a truthy value (true, 1, yes), each user in the response will include a ssoIdentities property containing a list of SSO identities associated with the user.

Responses

GET /api/users/{userId}
curl \
 -X GET https://[tenant_id].logto.app/api/users/{userId}
Response examples (200)
{
  "id": "string",
  "username": "string",
  "primaryEmail": "string",
  "primaryPhone": "string",
  "name": "string",
  "avatar": "string",
  "customData": {},
  "identities": {
    "userId": "string",
    "details": {}
  },
  "lastSignInAt": 42.0,
  "createdAt": 42.0,
  "updatedAt": 42.0,
  "profile": {
    "familyName": "string",
    "givenName": "string",
    "middleName": "string",
    "nickname": "string",
    "preferredUsername": "string",
    "profile": "string",
    "website": "string",
    "gender": "string",
    "birthdate": "string",
    "zoneinfo": "string",
    "locale": "string",
    "address": {
      "formatted": "string",
      "streetAddress": "string",
      "locality": "string",
      "region": "string",
      "postalCode": "string",
      "country": "string"
    }
  },
  "applicationId": "string",
  "isSuspended": true,
  "hasPassword": true,
  "ssoIdentities": [
    {
      "id": "string",
      "userId": "string",
      "issuer": "string",
      "identityId": "string",
      "detail": {},
      "createdAt": 42.0,
      "ssoConnectorId": "string"
    }
  ]
}