mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-12 10:55:11 +00:00
21 lines
499 B
Go
Executable File
21 lines
499 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/user"
|
|
)
|
|
|
|
// Check whether the token attached to MagicLink is valid or not.
|
|
// Ideally, you need to call this endpoint from your http request
|
|
// handler that handles the endpoint which is specified in the
|
|
// SendMagicLink request.
|
|
func main() {
|
|
userService := user.NewUserService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := userService.VerifyToken(&user.VerifyTokenRequest{
|
|
Token: "EdsUiidouJJJLldjlloofUiorkojflsWWdld",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|