java-authenticationlisted
Install: claude install-skill MuHamza30/paypal-api-plugin
# Authenticating an APIMatic Java SDK client
> **This API declares at least one security scheme**, so everything below applies to this SDK:
> `<root>/authentication/` exists and `{Api}Client.Builder` carries a credential setter per scheme. Read
> those setters for the real names.
How you authenticate depends on the security scheme(s) the API uses. APIMatic surfaces each scheme as a
**`{Scheme}Model` data class plus a matching setter on the client `Builder`**. Set the ones your API uses
when you build the client (see `java-client-initialization`).
To see which schemes a specific SDK accepts, read the **credential setters on `{Api}Client.Builder`** —
those are the source of truth. The models live in `<root>/authentication/`; the credentials *interface*
sits in the root package when the API has a single scheme and in `<root>/authentication/` when it has
several. `doc/auth/*.md` lists the same set in readable form.
## The universal shape
Every scheme follows the same three steps: build the model, pass it to the client builder, forget about
it.
```java
import {rootPackage}.{Api}Client;
import {rootPackage}.authentication.{Scheme}Model;
{Api}Client client = new {Api}Client.Builder()
.{scheme}Credentials(new {Scheme}Model.Builder(
System.getenv("API_CLIENT_ID"), // required credentials: Builder constructor
System.getenv("API_CLIENT_SECRET"))
.build())
.build();
```
- **Required credentials ar