Files
m3o-go/examples/user/create/createAnAccount/main.go
2021-12-09 15:06:12 +00:00

21 lines
409 B
Go
Executable File

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)
}