UpCloudLtd / upcloud-go-api

Go client for UpCloud's API
https://pkg.go.dev/github.com/UpCloudLtd/upcloud-go-api/v6
MIT License
42 stars 9 forks source link

Does the library work with uses with 2FA enabled? #26

Closed james-nesbitt closed 7 years ago

james-nesbitt commented 7 years ago

Can you tell me if your library has been tested/used with user credentials that have 2-factor authentication enabled?

james-nesbitt commented 7 years ago

To clarify, I am using your library, and running the ./service/Service.GetServers(), using a client with credentials that I have just tested, and I get the following error: (not error wrapping is from my lib, which uses logrus to pass back the library error)

ERRO[0000] Could not list UpCloud servers                error="Authentication failed using the given username and password. (AUTHENTICATION_FAILED)"
james-nesbitt commented 7 years ago

Ah, I apologize, I had obviously made a mistake in my tooling when passing credentials to the client. When I hardcoded my credentials into the Client constructor, it worked.

Closing this issue.

Jalle19 commented 7 years ago

I honestly haven't tried using the API with anything other than the main account credentials. I imagine 2FA is bypassed completely for the API.