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


Install the Akeyless gem package

gem install akeyless

Getting Started

Please follow the installation procedure and then run the following code:

require 'akeyless'

# default: public API Gateway
config =

# use port 8081 exposed by the deployment:
config.server_index = nil
config.scheme = 'https' =  ''

# use port 8080 exposed by the deployment with /v2 prefix: 
config.server_index = nil
config.scheme = 'https' =  ''

api =

# auth using email and password
body =
body.admin_email = '[email protected]'
body.admin_password = 'strong-password'
body.access_type = "password"

result = api.auth(body)
token = result.token

# get secret value using the token
body =
body.token = tokenbody.names = ['my-secret']
result = api.get_secret_value(body)

API Reference

For a detailed API reference, see here.