Skip to content
← Public packages

@cameronpak/box

Full Box Public API v1 client: lifecycle, prompts, files, commands, snapshots, environments, webhooks, desktop, hosting, and account.

src/get-me.ts

9 lines · 329 B · TypeScript
import { boxRequest, type Result } from './client.ts'
import type { BoxUser } from './types.ts'

export type GetMeOutput = { user: BoxUser }

/** Returns GitHub identity for the authenticated Box account. */
export default async function getMe(): Promise<Result<GetMeOutput>> {
	return boxRequest<GetMeOutput>({ path: '/me' })
}