The Akeyless Dev Hub

If you're looking for help with the only zero-trust, SaaS, unified platform for secrets management - you've come to the right place.

This is our documentation and updates center.



The Akeyless SDK for Go makes it easy for you to integrate your Go applications, libraries, or scripts with the Akeyless Vault secret management services.
The below Go code examples shows a typical sequence of how to integrate secrets into your application.


Use go get to retrieve the package in order to add it to your GOPATH workspace, or project's Go module dependencies.

go get

To update the package use go get -u to retrieve the latest version.

go get -u

API Server Configuration

cfg := akl.NewConfiguration()
cfg.BasePath = ""
client := akl.NewAPIClient(cfg)
api := client.DefaultApi
ctx := context.Background()


accessId := os.Getenv("AKEYLESS_ACCESS_ID")
    accessKey := os.Getenv("AKEYLESS_ACCESS_KEY")

    if accessId == "" || accessKey == "" {
        panic("Require Access ID and Access Key")

    // Authenticate to the service and returns an access token
    authReplyObj, _,err := api.Auth(ctx, accessId, &akl.AuthOpts{
        AccessKey: optional.NewString(accessKey),
    if err != nil {

    token := authReplyObj.Token


Authentication method

In addition to authentication with Access-ID and Access-Key, you can authenticate to Akeyless Vault with username and password.

Create a New Static Secret

secretName := "name_example"
secretValue := "value_example"

// Create new static secret
_, _,err = api.CreateSecret(ctx, secretName, secretValue, token, nil)
if err != nil {

Get Static Secret Value

getValReplyObj, _,err := api.GetSecretValue(ctx, secretName, token)

Get Static Secret Details

// Get static secret details
descReplyObj, _,err := api.DescribeItem(ctx, secretName, token)
if err != nil {

Update Static Secret Value

// Update static secret value
newSecretValue := "value_example"
_, _,err = api.UpdateSecretVal(ctx, secretName, newSecretValue, token, nil)
if err != nil {


Documentation for API calls

Updated 4 months ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.