Client
ClientsClient exposes the identity and permissions of the authenticated (token-scoped)
B2B client. It is the smallest domain client β one read-only method β and a good first
call to confirm your credentials and signature are both correct before touching money
movement.
Reach it either directly on RetornaClient or through client.clients() β both call
the same code.
getMyClient()β
Returns identity and permission information for the client the current credentials belong to.
Signatureβ
public ClientResponse getMyClient()
Parametersβ
This method takes no parameters.
Returnsβ
ClientResponse:
| Accessor | Type | Meaning |
|---|---|---|
client() | ClientInfo | Identity and permissions β see below. |
funding() | Map<String, Object> | Opaque, nullable. Not documented further here; treat it as unstructured. |
ClientInfo:
| Accessor | Type | Meaning |
|---|---|---|
id() | String | Client UUID. |
client() | String | Internal client key/slug. |
name() | String | Display name. |
isActive() | boolean | Whether the client is active. |
permissions() | List<String> | Granted permission strings. |
Exampleβ
import app.retorna.sdk.RetornaClient;
import app.retorna.sdk.RetornaClientBuilder;
import app.retorna.sdk.core.environment.RetornaEnvironment;
import app.retorna.sdk.models.client.ClientResponse;
RetornaClient client = new RetornaClientBuilder()
.environment(RetornaEnvironment.SANDBOX)
.clientId(System.getenv("RETORNA_CLIENT_ID"))
.clientSecret(System.getenv("RETORNA_CLIENT_SECRET"))
.privateKey(System.getenv("RETORNA_PRIVATE_KEY"))
.buildClient();
ClientResponse me = client.getMyClient();
System.out.printf("%s (active=%s) permissions=%s%n",
me.client().name(), me.client().isActive(), me.client().permissions());
Errorsβ
RetornaB2BExceptionwithcodeEnum()one of:B2B_UNAUTHORIZEDβ token or signature rejected,B2B_COMPANY_NOT_FOUND,B2B_RATE_LIMITEDβ retryable,B2B_UNKNOWN. Checke.codeEnum().isRetryable().RetornaAuthExceptionβ the OAuth2 token exchange itself failed.RetornaSdkExceptionβ network failure or deserialization failure.
Notesβ
- If this call throws, the exception tells you whether the problem was your token
(
RetornaAuthException) or your request signature (RetornaB2BExceptionwithB2B_UNAUTHORIZED) β a good first thing to call when wiring up a new environment. - There is no public API reference page for this endpoint (it is not part of the published API reference).