Skip to content

Kody is live

Watch the launch video — what Kody is, and why it exists.

← Public packages

@kody/blandPublic

src/me.ts

24 lines · 493 B · TypeScript
/**
 * Read Bland account metadata (`GET /v1/me`).
 * Cheap auth smoke check after saving blandApiKey.
 *
 * @param input - optional auth overrides
 * @returns Account payload
 *
 * @example
 * import me from 'kody:@kody/bland/me'
 * await me()
 */
import { blandRequest, type BlandAuthInput } from './core.ts'

export type MeInput = BlandAuthInput

export async function me(input: MeInput = {}) {
	return blandRequest({
		...input,
		method: 'GET',
		path: '/v1/me',
	})
}

export default me