Skip to main content
1
Install the SDK
2
Requires Go 1.21 or later.
3
go get github.com/paxosglobal/paxos-go
4
Set Up Credentials
5
Create API credentials in the Paxos Dashboard and export them as environment variables.
6
export PAXOS_CLIENT_ID="your_client_id"
export PAXOS_CLIENT_SECRET="your_client_secret"
7
If you don’t have a Sandbox account, sign up here.
8
Make Your First API Call
9
Create a file called main.go with the following code. This example creates a client, lists your profiles, and prints the result.
10
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/paxosglobal/paxos-go"
)

func main() {
	client, err := paxos.NewClient(
		os.Getenv("PAXOS_CLIENT_ID"),
		os.Getenv("PAXOS_CLIENT_SECRET"),
		paxos.WithSandbox(),
	)
	if err != nil {
		log.Fatal(err)
	}

	ctx := context.Background()

	// List profiles
	iter := client.Profiles.ListProfiles(ctx, &paxos.ListProfilesRequest{
		Limit: 10,
	})
	for iter.Next() {
		profile := iter.Current()
		fmt.Printf("Profile: %s (%s)\n", profile.ID, profile.Nickname)
	}
	if err := iter.Err(); err != nil {
		log.Fatal(err)
	}
}
11
Run the program:
12
go run main.go

Next Steps