Skip to main content
The Everabyte API is plain JSON over HTTPS, so Laravel’s HTTP client is enough. This guide shows a pattern you can adapt; it is not an official SDK.

Configuration

Store credentials in config/services.php and the environment, never in code.
Never commit .env. Use your deployment platform’s secret store in production.

A small client

Uploading a file

Http::attach() streams from disk when you pass a path with a resource, but be explicit about memory.
A multi-file request returns only the first file’s result. If you send more than one part, list the folder afterward to discover every fileId.

Downloading a file

Stream to a response instead of buffering the whole file in PHP memory.
Keep the filename you present under your own control. Do not pass a user-supplied filename straight into a Content-Disposition header without sanitizing it.

Error handling

Laravel’s throw() raises RequestException for 4xx/5xx. Decode the envelope yourself so you can branch on code.
Rules that matter:

Queues and timeouts

Large uploads do not belong in a synchronous web request.
  • Push uploads to a queued job with a generous timeout.
  • Set retry_after above your job timeout so jobs are not duplicated.
  • Make the job idempotent by recording the resulting fileId.
  • Do not retry a failed upload blindly; check whether the object already exists.

Security checklist

  • Credentials only from environment or a secret manager.
  • Key scoped to the operations you actually use.
  • Key restricted to the buckets you actually use.
  • Uploaded files treated as untrusted content.
  • File type and size validated before upload.
  • Filenames sanitized for display and headers.
  • No secrets in logs, including exception traces.
  • Separate keys per environment.

Upload files

Upload semantics and limits.

Download files

Streaming and ranges.

Authentication

Key model and scopes.

Error codes

Stable codes.