Search…
Getting started with Go

Overview

Clerk's Go SDK is a thin wrapper over our Backend API. Add the following import statement:
1
import "github.com/clerkinc/clerk-sdk-go/clerk"
Copied!
If Go doesn't automatically add the module, you can explicitly add it with:
1
$ go get github.com/clerkinc/clerk-sdk-go
Copied!

Clerk client

Now, you can create a Clerk client by calling the clerk.NewClient function. This function requires your Clerk API key. You can get this from the dashboard of your Clerk application in Settings > API Keys.
Then create a client object to use the various services Clerk provides.
1
2
client, err := clerk.NewClient("CLERK_API_KEY")
3
if err != nil {
4
// handle error
5
}
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub