const { result, error } = await unkey.identities.list({
  limit: 100
});

if (error) {
  // handle potential network or bad request error
  // a link to our docs will be in the `error.docs` field
  console.error(error.message);
  return;
}
console.log(result);
{
  "result": {
    "identities": [
      {
        "id": "<string>",
        "externalId": "<string>",
        "ratelimits": [
          {
            "name": "tokens",
            "limit": 10,
            "duration": 1000
          }
        ]
      }
    ],
    "cursor": "eyJrZXkiOiJrZXlfMTIzNCJ9",
    "total": 100
  }
}
const { result, error } = await unkey.identities.list({
  limit: 100
});

if (error) {
  // handle potential network or bad request error
  // a link to our docs will be in the `error.docs` field
  console.error(error.message);
  return;
}
console.log(result);
{
  "result": {
    "identities": [
      {
        "id": "<string>",
        "externalId": "<string>",
        "ratelimits": [
          {
            "name": "tokens",
            "limit": 10,
            "duration": 1000
          }
        ]
      }
    ],
    "cursor": "eyJrZXkiOiJrZXlfMTIzNCJ9",
    "total": 100
  }
}

Request

environment
string
This is not yet used but here for future compatibility.
limit
int
The maximum number of identities to returnRequired range: 1 <= x <= 100Example: 100
cursor
string
Use this to fetch the next page of results. A new cursor will be returned in the response if there are more results.

Response

identities
object[]
required
A list of identity objects, each containing its id, externalId, and associated ratelimits.
total
int
required
The total number of identities for this environment
cursor
string
The cursor to use for the next page of results, if no cursor is returned, there are no more resultsExample:"eyJrZXkiOiJrZXlfMTIzNCJ9"