mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
25 lines
530 B
Go
Executable File
25 lines
530 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/user"
|
|
)
|
|
|
|
// Login using email only - Passwordless
|
|
func main() {
|
|
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := userService.SendMagicLink(&user.SendMagicLinkRequest{
|
|
Address: "www.example.com",
|
|
Email: "joe@example.com",
|
|
Endpoint: "verifytoken",
|
|
FromName: "Awesome Dot Com",
|
|
Subject: "MagicLink to access your account",
|
|
TextContent: `Hi there,
|
|
|
|
Click here to access your account $micro_verification_link`,
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|