1

I'm using the SoftLayer REST API, and instead of username and API key, I'd like to authenticate with my IAM token. Is this possible?

BenJuan26
  • 70
  • 1
  • 8

2 Answers2

1

This is actually now possible. You can use your IAM api key to authenticate with the Softlayer API now. To do that you can do the following.

curl --location --request GET 'https://api.softlayer.com/rest/v3/SoftLayer_Account?objectMask=networkVlanSpan' \
--header 'Authorization: bearer <your token>'

To get the token run ibmcloud iam oauth-tokens.

Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48
Albert Camacho
  • 1,129
  • 1
  • 7
  • 13
1

This is actually now possible. You can use your IAM api key to authenticate with the Softlayer API now. To do that you can do the following.

curl --location --request GET 'https://api.softlayer.com/rest/v3/SoftLayer_Account?objectMask=networkVlanSpan' \
--header 'Authorization: bearer <your token>'

To get the token run ibmcloud iam oauth-tokens.

Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48