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
| Service | Host |
|---|---|
| Storage Authorization API | https://storage-authorization.cleverbase.com |
| Storage Resource Server | https://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.
| Requirement | Value |
|---|---|
| Grant type | Authorization Code |
| Scope | com.cleverbase.storage |
What the flow looks like
- Your application runs an OAuth 2.0 authorization code flow against Cleverbase Identification, asking for the
com.cleverbase.storagescope. - The user authenticates, and you exchange the authorization code for an
access_token. - You call
POST /v1/credentialswith that token, and get back a bucket name, an S3-compatible endpoint and a set of short-lived credentials. - 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.