Package africa.sendbyte.apikeys
Class ApiKey
java.lang.Object
africa.sendbyte.apikeys.ApiKey
An API key.
The full key is populated only on the ApiKeys.create(java.lang.String, africa.sendbyte.apikeys.KeyScope, africa.sendbyte.apikeys.KeyMode)
response and is shown once. List responses instead expose a masked prefix.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Unique key identifier (prefixedkey_); pass toApiKeys.revoke(String).getKey()The full API key string.ISO 8601 timestamp of the most recent authenticated request, ornullif unused.getMode()Raw mode string.getName()The human-readable label assigned at creation.A masked prefix identifying the key (e.g.getScope()Raw scope string.mode()The mode as a typed enum, mapping unknown values toKeyMode.UNKNOWN.scope()The scope as a typed enum, mapping unknown values toKeyScope.UNKNOWN.voidsetCreatedAt(String createdAt) voidvoidvoidsetLastUsedAt(String lastUsedAt) voidvoidvoidvoid
-
Constructor Details
-
ApiKey
public ApiKey()
-
-
Method Details
-
getId
Unique key identifier (prefixedkey_); pass toApiKeys.revoke(String). -
setId
-
getName
The human-readable label assigned at creation. -
setName
-
getKey
The full API key string. Present only on the create response — store it immediately. -
setKey
-
getPrefix
A masked prefix identifying the key (e.g.sk_live_84f8e388...). Present on list. -
setPrefix
-
getScope
Raw scope string. Seescope()for the typed value. -
setScope
-
scope
The scope as a typed enum, mapping unknown values toKeyScope.UNKNOWN. -
getMode
Raw mode string. Seemode()for the typed value. -
setMode
-
mode
The mode as a typed enum, mapping unknown values toKeyMode.UNKNOWN. -
getLastUsedAt
ISO 8601 timestamp of the most recent authenticated request, ornullif unused. -
setLastUsedAt
-
getCreatedAt
-
setCreatedAt
-