@spec verify_key(binary, map()) :: map()

Verify a key from your users. You only need to send the api key from your user. Optionally, pass in a second param, a map with the key apiId which sends the apiId along.

Request

key
string
required

The key you want to verify.

apiId
string
required

The API of the key you want to verify.

Response

valid
boolean
required

Whether or not this key is valid and has passed the ratelimit. If false you should not grant access to whatever the user is requesting

ownerId
string

If you have set an ownerId on this key it is returned here. You can use this to clearly authenticate a user in your system.

meta
object

This is the meta data you have set when creating the key.

Example:

{
  "billingTier": "PRO",
  "trialEnds": "2023-06-16T17:16:37.161Z"
}