const { result, error= await unkey.keys.getVerifications({ keyId: "key_123" });

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)
{
  "verifications": [
    {
      "time": 1620000000000,
      "success": 100,
      "rateLimited": 0,
      "usageExceeded": 0
    },
    {
      "time": 1640000000000,
      "success": 142,
      "rateLimited": 11,
      "usageExceeded": 20
    },
  ]
}
const { result, error= await unkey.keys.getVerifications({ keyId: "key_123" });

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)
{
  "verifications": [
    {
      "time": 1620000000000,
      "success": 100,
      "rateLimited": 0,
      "usageExceeded": 0
    },
    {
      "time": 1640000000000,
      "success": 142,
      "rateLimited": 11,
      "usageExceeded": 20
    },
  ]
}

Request

Either ownerId or keyId is required. Not both.

keyId
string
required

The ID of the key you want to check.

ownerId
string
required

The ownerId associated with one or more keys you want to check.

start
integer

The unix timestamp in milliseconds to start the query from. Defaults to 30 days ago.

end
integer

The unix timestamp in milliseconds to end the query at. Defaults to now.

granularity
day
default:"day"

The granularity of the data. Only day is supported at this time.

Response

result
object