Warning

The Storage API is in beta. It is subject to change and should not be used in production.

Get scoped, temporary Amazon S3-compatible credentials for a private bucket on Cleverbase infrastructure. Every client-user pair gets its own bucket, and the credentials are restricted to that one bucket, so one user can never reach another user's files.

Hosts

ServiceHost
Storage Authorization APIhttps://storage-authorization.cleverbase.com
Storage Resource Serverhttps://storage.cleverbase.com

Authentication

The API is an OAuth 2.0 resource server, so every request carries a bearer access token from the Identification API.

RequirementValue
Grant typeAuthorization Code
Scopecom.cleverbase.storage

What the flow looks like

Cleverbase Storage Resource ServerStorage Authorization APICleverbase Identification APIClient ApplicationCleverbase Storage Resource ServerStorage Authorization APICleverbase Identification APIClient ApplicationAuthorization request (scope: com.cleverbase.storage)1access_token2POST /v1/credentials (Bearer access_token)3bucket, endpoint, temporary credentials4S3 operations (using temporary credentials)5
  1. Your application runs an OAuth 2.0 authorization code flow against Cleverbase Identification, asking for the com.cleverbase.storage scope.
  2. The user authenticates, and you exchange the authorization code for an access_token.
  3. You call POST /v1/credentials with that token, and get back a bucket name, an S3-compatible endpoint and a set of short-lived credentials.
  4. From there you use any S3 SDK or tool directly against Cleverbase Storage with those credentials.

Credentials expire after one hour. Call POST /v1/credentials again for a fresh set; the bucket name stays the same across refreshes.