Package africa.sendbyte.apikeys
Class ApiKeys
java.lang.Object
africa.sendbyte.apikeys.ApiKeys
The API Keys resource: create scoped keys, list active keys, and revoke keys.
Obtain an instance via client.apiKeys(). These operations require a
full_access key. Every method has a blocking form and an ...Async
form returning a CompletableFuture.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new API key.createAsync(String name, KeyScope scope, KeyMode mode) Asynchronouscreate(String, KeyScope, KeyMode).list()List all active (non-revoked) keys.Asynchronouslist().voidRevoke a key immediately.revokeAsync(String id) Asynchronousrevoke(String).
-
Constructor Details
-
ApiKeys
-
-
Method Details
-
create
Create a new API key. The full key value is returned once, onApiKey.getKey()— store it immediately.- Parameters:
name- a human-readable label, e.g."Production backend"scope- the permission scopemode- the environment mode (live or test)
-
createAsync
Asynchronouscreate(String, KeyScope, KeyMode). -
list
List all active (non-revoked) keys. Full key values are not included. -
listAsync
Asynchronouslist(). -
revoke
Revoke a key immediately. A key cannot revoke itself — use a separatefull_accesskey to perform the revocation. -
revokeAsync
Asynchronousrevoke(String).
-