Auth SDK for GOLang
The IONOS Cloud SDK Auth for GO provides you with access to the IONOS Cloud Auth API. Use the Auth API to manage tokens for secure access to IONOS Cloud APIs (Auth API, Cloud API, Reseller API, Activity Log API, and others).
- API version: 1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
An IONOS account is required for access to the Cloud API; credentials from your registration are used to authenticate against the IONOS Cloud API.
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
Put the package under your project folder by adding it to the
You can get the package locally using:
go get "github.com/ionos-cloud/sdk-go-auth"
The username and password or the authentication token can be manually specified when initializing the sdk client:
client := ionossdk.NewAPIClient(ionossdk.NewConfiguration(username, password, token, hostUrl))
Environment variables can also be used. The sdk uses the following variables:
- IONOS_USERNAME - to specify the username used to log in
- IONOS_PASSWORD - to specify the password
- IONOS_TOKEN - if an authentication token is being used
- IONOS_API_URL - to specify the API endpoint in order to overwrite it
In this case, the client configuration needs to be initialized using
client := ionossdk.NewAPIClient(ionossdk.NewConfigurationFromEnv())
All paths are relative to https://api.ionos.com/auth/v1
- How can I open a bug report/feature request?
- Can I contribute to the GO SDK for Auth API?
Pure SDKs are automatically generated using OpenAPI Generator and don’t support manual changes. If you require changes, please open an issue, and we will try to address it.