SDK Reference

    @proveanything/smartlinks

    npm install @proveanything/smartlinks
    View on npm →

    Namespaces

    Identity & Access

    authKit

    End‑user auth flows (email/password, OAuth, phone); profiles and verification.

    26 functions15 types

    login

    Login with email + password (public).

    public
    login(clientId: string, email: string, password: string) → Promise<>

    register

    Register a new user (public).

    public
    register(clientId: string, data: { email: string; password: string; displayName?: string; accountData?: Record<string, any> }) → Promise<>

    googleLogin

    Google OAuth login (public).

    public
    googleLogin(clientId: string, idToken: string) → Promise<>

    sendMagicLink

    Send a magic link email to the user (public).

    public
    sendMagicLink(clientId: string, data: { email: string; redirectUrl: string; accountData?: Record<string, any> }) → Promise<>

    verifyMagicLink

    Verify a magic link token and authenticate/create the user (public).

    public
    verifyMagicLink(clientId: string, token: string) → Promise<MagicLinkVerifyResponse>

    sendPhoneCode

    Send phone verification code (public).

    public
    sendPhoneCode(clientId: string, phoneNumber: string) → Promise<>

    verifyPhoneCode

    Verify phone verification code (public).

    public
    verifyPhoneCode(clientId: string, phoneNumber: string, code: string) → Promise<>

    requestPasswordReset

    Verify phone verification code (public).

    public
    requestPasswordReset(clientId: string, data: { email: string; redirectUrl?: string; clientName?: string }) → Promise<>

    verifyResetToken

    Verify phone verification code (public).

    public
    verifyResetToken(clientId: string, token: string) → Promise<>

    completePasswordReset

    Verify phone verification code (public).

    public
    completePasswordReset(clientId: string, token: string, newPassword: string) → Promise<>

    sendEmailVerification

    Verify phone verification code (public).

    public
    sendEmailVerification(clientId: string, data: { userId: string; email: string; redirectUrl?: string; clientName?: string }) → Promise<>

    verifyEmail

    Verify phone verification code (public).

    public
    verifyEmail(clientId: string, token: string) → Promise<>

    resendEmailVerification

    Verify phone verification code (public).

    public
    resendEmailVerification(clientId: string, data: { userId: string; email: string; redirectUrl?: string; clientName?: string }) → Promise<>

    getProfile

    Verify phone verification code (public).

    public
    getProfile(clientId: string) → Promise<>

    updateProfile

    Verify phone verification code (public).

    public
    updateProfile(clientId: string, data: ) → Promise<>

    changePassword

    Verify phone verification code (public).

    public
    changePassword(clientId: string, currentPassword: string, newPassword: string) → Promise<>

    changeEmail

    Verify phone verification code (public).

    public
    changeEmail(clientId: string, newEmail: string, password: string, redirectUrl: string) → Promise<>

    verifyEmailChange

    Verify phone verification code (public).

    public
    verifyEmailChange(clientId: string, token: string) → Promise<>

    updatePhone

    Verify phone verification code (public).

    public
    updatePhone(clientId: string, phoneNumber: string, verificationCode: string) → Promise<>

    deleteAccount

    Verify phone verification code (public).

    public
    deleteAccount(clientId: string, password: string, confirmText: string) → Promise<>

    load

    Verify phone verification code (public).

    public
    load(authKitId: string) → Promise<>

    get

    Verify phone verification code (public).

    public
    get(collectionId: string, authKitId: string) → Promise<>

    list

    Verify phone verification code (public).

    admin
    list(collectionId: string, admin?: boolean) → Promise<[]>

    create

    Verify phone verification code (public).

    public
    create(collectionId: string, data: any) → Promise<>

    update

    Verify phone verification code (public).

    public
    update(collectionId: string, authKitId: string, data: any) → Promise<>

    remove

    Verify phone verification code (public).

    public
    remove(collectionId: string, authKitId: string) → Promise<void>