Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 613 Bytes

walkthrough.md

File metadata and controls

31 lines (24 loc) · 613 Bytes
  1. Passbase expects Go version to be go1.15+
go get github.com/passbase/[email protected]
  1. Import passbase into your app
package main

import (
	"context"
    "fmt"

	passbase "github.com/passbase/passbase-go"
)

func main() {
	client := passbase.NewAPIClient(passbase.NewConfiguration())
	ctx := context.WithValue(context.Background(), passbase.ContextAPIKey, passbase.APIKey{
		Key: "{{YOUR_SECRET_API_KEY}}",
    })

	identity, _, err := client.IdentityApi.GetIdentityById(ctx, "<uuid>")
	if err != nil {
		panic(err)
	}
	fmt.Println("Identity for ", identity.Id, "->", identity)
}