Skip to content

Instantly share code, notes, and snippets.

@asim
Created February 8, 2022 11:16
Show Gist options
  • Save asim/1a4fdbebc87651f916caf0ed3c0960bf to your computer and use it in GitHub Desktop.
Save asim/1a4fdbebc87651f916caf0ed3c0960bf to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
"go.m3o.com/user"
)
// Create a new user account. The email address and username for the account must be unique.
func main() {
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
rsp, err := userService.Create(&user.CreateRequest{
Email: "joe@example.com",
Id: "user-1",
Password: "Password1",
Username: "joe",
})
fmt.Println(rsp, err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment