Skip to main content
Beta The Groups class provides methods for interacting with and managing groups in 1Password.

Requirements

To use this feature, you’ll need to install the 1Password SDK from the beta branch:
go get github.com/1password/onepassword-sdk-go@v0.4.0-beta.1

Get a group

You can use Groups.Get to fetch a group in your 1Password account.
Replace groupID with the group’s unique identifier.
# TODO: Replace with a string containing the ID for the group you want to retrieve.
groupID := "groupID"

groupGetParams := onepassword.GroupGetParams{}

group, err := client.Groups().Get(context.Background(), groupID, groupGetParams)
if err != nil {
	panic(err)
}
fmt.Printf("Group details: %v\n", group)