profile

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package profile fetches the authenticated user's account and subscription info from the Anthropic oauth profile endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	DisplayName      string // account.display_name
	Email            string // account.email
	OrganizationName string // organization.organization_name
	SubscriptionType string // derived from organization.organization_type
}

Info holds the fields we surface in the welcome card.

func Fetch

func Fetch(ctx context.Context, accessToken string) (Info, error)

Fetch retrieves profile info using the given OAuth access token. Non-fatal: returns a zero Info and nil error when the endpoint is unreachable or returns a non-200 status (e.g. API-key-only users).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL