Documentation Index
Fetch the complete documentation index at: https://www.1password.dev/llms.txt
Use this file to discover all available pages before exploring further.
If you have 1Password Business or 1Password Teams, you can use 1Password SDKs to manage groups.
Before you get started
Before you begin, follow the steps to get started with a 1Password SDK. The examples on this page assume you have an initialized client instance. For example:
package main
import (
"context"
"github.com/1password/onepassword-sdk-go"
)
func main() {
// TODO: Initialize client using your preferred authentication method (see Overview > Get started)
client, err := onepassword.NewClient(context.Background(),
)
if err != nil {
panic(err)
}
// Your code here
}
import sdk from "@1password/sdk";
async function main() {
const client = await sdk.createClient({
// TODO: Initialize client using your preferred authentication method (see Overview > Get started)
});
// Your code here
}
main().catch(console.error);
const sdk = require("@1password/sdk");
async function main() {
const client = await sdk.createClient({
// TODO: Initialize client using your preferred authentication method (see Overview > Get started)
});
// Your code here
}
main().catch(console.error);
import asyncio
from onepassword import Client # Also import DesktopAuth for desktop app authentication.
async def main():
# TODO: Initialize client using your preferred authentication method (see Overview > Get started)
client = await Client.authenticate(...)
# Your code here
asyncio.run(main())
See the examples folder in the 1Password Go, JavaScript, or Python SDK GitHub repository for full example code you can quickly clone and test in your project.
Get a group
To fetch a group, use the Groups().Get() method.Replace groupID with the group’s unique identifier.// Get a group
group, err := client.Groups().Get(context.Background(), groupID, onepassword.GroupGetParams{})
if err != nil {
panic(err)
}
fmt.Printf("Group details: %v\\n", group)
To fetch a group, use the groups.get() method.Replace groupId with the group’s unique identifier.// Get a group
const group = await client.groups.get(groupId, { vaultPermissions: false });
console.log(JSON.stringify(group));
To fetch a group, use the groups.get() method.from onepassword import GroupGetParams
# Get a group
group = await client.groups.get("your-group-id", GroupGetParams(vaultPermissions=False))
print(group)