addApiAuthenticationKey


SoftLayer_User_Customer_OpenIdConnect_TrustedProfile::addApiAuthenticationKey

Create a user’s API authentication key.

Description

Create a user’s API authentication key, allowing that user access to query the SoftLayer API. addApiAuthenticationKey() returns the user’s new API key. Each portal user is allowed only one API key.

Parameters

None

Required Headers

Optional Headers

  • None

Return Values

  • string

Error Handling

  • Throws the exception “Generating an API key for a user in PENDING status is disallowed.” if the given user is in PENDING status.
  • Throws the exception “Each user can only have a single API key.” if the given user already has an API key defined.

Associated Methods

curl -g -u $SL_USER:$SL_APIKEY -X GET \
'https://api.softlayer.com/rest/v3.1/SoftLayer_User_Customer_OpenIdConnect_TrustedProfile/{SoftLayer_User_Customer_OpenIdConnect_TrustedProfileID}/addApiAuthenticationKey'