November 15, 2015


Password Auth

Authenticate to the API with a username + password instead of an API key. Might be useful if you want to GET the api key without logging in to the portal
require 'softlayer_api' # Requires softlayer_api >= 3.2

# Create a client
client = SoftLayer::Client.with_password(
    username: 'change me', password: 'change me')

# Test our client
puts client['Account'].object_mask('mask[id, apiAuthenticationKeys]').
    getCurrentUser

Feedback?

If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue