An ApiKey is mostly used for authenticating non-interactive clients such as scripts or other types of services. An ApiKey is associated with a User whose permissions will apply when the ApiKey is used for authorization.
Similar to how passwords are handled, only a hash of the API key is stored in the database meaning, generated API-Keys are not viewable after creation, Users are responsible for storing them.
Hence, if a User forgets their ApiKey, the old one must be deleted and a new one created. This is called "rotating" an ApiKey.
Extends: VendureEntity
Implements: HasCustomFields, ChannelAware, Translatable, SoftDeletable
stringstringDate | nullDate | nullUserIDUserIDChannel[]Array<Translation<ApiKey>>CustomApiKeyFieldsLocaleString