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 initializedclient instance. For example:
- Go
- JavaScript
- Python
Get a group
- Go
- JavaScript
- Python
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
New! Use the 1Password Credential Broker to give CI/CD and other machine workflows short-lived access to secrets, without managing service account tokens.
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())
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)
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));
groups.get() method.from onepassword import GroupGetParams
# Get a group
group = await client.groups.get("your-group-id", GroupGetParams(vaultPermissions=False))
print(group)
Related topics
Manage vault permissions using 1Password SDKsManage vaults using 1Password SDKs1Password SDKsWas this page helpful?