To use Skyflow's Management API, Data API, or SDKs, you need a bearer token to authenticate your API calls. Bearer tokens allow time-limited, scoped, and permission-sensitive access to your Skyflow account and the vaults it contains.
Sign in to your Skyflow account:
If you don't have an account, sign up for a free trial account.Create a vault
You can generate a bearer token with an SDK or (if you're in a trial environment) through Skyflow Studio.
When you integrate your backend systems with one of Skyflow's SDKs, you can use service account credentials to generate bearer tokens. Bearer tokens generated from SDKs are valid for 60 minutes and let you make API calls allowed by the policies associated with the service account.
A service account is an identity for machine access to your vault. A service account's roles, and the policies attached to those roles, decide the level of access a service account has to a vault.
If you already have a service account, skip to step 2.
Now that you have your credentials.json file, it's time to prepare the SDK in the language of your choice.
Make sure your project is using Go Modules:
Then reference skyflow-go in a Go program with
With the SDK installed, you can generate bearer tokens by passing your credentials.json file into an appropriate language-specific function.
The Go SDK has two functions that can take credentials.json and return a bearer token:
GenerateBearerToken(filepath)takes the path to credentials.json as input.
GenerateBearerTokenFromCreds(credentials)takes the body of credentials.json as a string as input.
Once you have your bearer token, you can programmatically interact with Skyflow APIs. See next steps.
If you're in a trial environment, you can generate bearer tokens through Studio. Bearer tokens generated in Studio are valid for 24 hours and let you make API calls allowed by the policies associated with your account.
Studio copies the token onto your clipboard.
You can now use your bearer token to interact with Skyflow APIs.
If you're new to Skyflow, see the Get started guide. Otherwise, see the various ways you can use Skyflow APIs:
In this article
© 2022 Skyflow, Inc. All rights reserved.
Terms and Conditions