Skip to content

userhubdev/go-sdk

Folders and files

NameName
Last commit message
Last commit date
Apr 18, 2025
Apr 29, 2025
Apr 29, 2025
Apr 18, 2025
Feb 19, 2024
Feb 19, 2024
Feb 19, 2024
Feb 6, 2024
Apr 18, 2025
Apr 29, 2025
Apr 29, 2025
May 1, 2025
Apr 29, 2025
Apr 18, 2025
Jun 5, 2024
Feb 19, 2024
Apr 18, 2025
Feb 6, 2024
Feb 24, 2024
Mar 28, 2024
Apr 29, 2025
Nov 29, 2024
Nov 29, 2024

Repository files navigation

UserHub Go SDK

Go Reference Go Latest Version

The official UserHub Go SDK.

Stability: alpha

Requirements

  • Go 1.20 or later

Getting Started

Install SDK

go get -u github.com/userhubdev/go-sdk

Example

package main

import (
	"context"
	"fmt"

	"github.com/userhubdev/go-sdk/adminapi"
)

func main() {
	adminApi, err := adminapi.New("sk_123...")
	if err != nil {
		panic(err)
	}

	res, err := adminApi.Users().List(context.TODO(), &adminapi.UserListInput{
		PageSize: 5,
	})
	if err != nil {
		panic(err)
	}

	for _, user := range res.Users {
		fmt.Println(user.Id, user.DisplayName)
	}
}

See the examples directory for more examples.