API Reference: Zammad API Authentication
The one-line entry point. ZammadClient::connect() accepts named parameters — exactly one auth method must be provided:
| Parameter |
Auth Method |
Header |
token: |
HTTP Token |
Authorization: Token token=... |
oauth2: |
OAuth2 |
Authorization: Bearer ... |
user:+pass: |
Basic Auth |
Authorization: Basic base64(user:pass) |
Throws InvalidArgumentException when zero or multiple auth methods are provided. Auto-wires Guzzle → RetryAfterMiddleware → RequestHandler internally — the caller gets a fully configured client.
Sets User-Agent: Zammad API PHP on every request. Optional debug: true (Guzzle debug to stdout) and verifySsl: false (disable TLS verification for development).
The DI constructor new ZammadClient($handler) remains available for containers — connect() is the sugar, not a replacement.
Acceptance Criteria
Depends on
Produces
ZammadClient (connect method)
API Reference: Zammad API Authentication
The one-line entry point.
ZammadClient::connect()accepts named parameters — exactly one auth method must be provided:token:Authorization: Token token=...oauth2:Authorization: Bearer ...user:+pass:Authorization: Basic base64(user:pass)Throws
InvalidArgumentExceptionwhen zero or multiple auth methods are provided. Auto-wires Guzzle →RetryAfterMiddleware→RequestHandlerinternally — the caller gets a fully configured client.Sets
User-Agent: Zammad API PHPon every request. Optionaldebug: true(Guzzle debug to stdout) andverifySsl: false(disable TLS verification for development).The DI constructor
new ZammadClient($handler)remains available for containers —connect()is the sugar, not a replacement.Acceptance Criteria
Depends on
Produces
ZammadClient(connect method)