You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to retrieve a list of all accounts on my IBM Cloud using the List() API call from the accountv2 package. Unfortunately, I keep encountering the following error: Error: Request failed with status code: 500, internal_error.
Below is the source code I've been working with:
package main
import (
"fmt""github.com/IBM-Cloud/bluemix-go""github.com/IBM-Cloud/bluemix-go/api/account/accountv2""github.com/IBM-Cloud/bluemix-go/session"
)
funcmain() {
conf:=&bluemix.Config{
BluemixAPIKey: "YOUR_IBMCLOUD_API_KEY",
}
s, err:=session.New(conf)
iferr!=nil {
panic("Error in session creation: "+err.Error())
}
svc, err:=accountv2.New(s)
iferr!=nil {
panic("Error in Account client: "+err.Error())
}
client:=svc.Accounts()
res, err:=client.List()
iferr!=nil {
panic("Error in Account List API call: "+err.Error())
}
for_, acc:=rangeres {
fmt.Printf("Account Name: %s", acc.Name)
}
}
If there are any corrections needed or best practices I might have overlooked, I'd greatly appreciate your guidance. This issue is currently a significant obstacle in our project's progress, so any expedited advice or solutions would be immensely valuable.
Thank you for your support!
The text was updated successfully, but these errors were encountered:
Hello Team,
I'm attempting to retrieve a list of all accounts on my IBM Cloud using the
List()
API call from the accountv2 package. Unfortunately, I keep encountering the following error:Error: Request failed with status code: 500, internal_error
.Below is the source code I've been working with:
If there are any corrections needed or best practices I might have overlooked, I'd greatly appreciate your guidance. This issue is currently a significant obstacle in our project's progress, so any expedited advice or solutions would be immensely valuable.
Thank you for your support!
The text was updated successfully, but these errors were encountered: