Retrieve the current user
package main
import (
"context"
"fmt"
"github.com/stainless-api/stainless-api-go"
"github.com/stainless-api/stainless-api-go/option"
)
func main() {
client := stainless.NewClient(
option.WithAPIKey("My API Key"),
)
user, err := client.User.Get(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", user.ID)
}
{
"id": "id",
"email": "email",
"github": {
"username": "username"
},
"name": "name",
"object": "user"
}Returns Examples
{
"id": "id",
"email": "email",
"github": {
"username": "username"
},
"name": "name",
"object": "user"
}