Skip to content

register a user to an application #78

@smilad

Description

@smilad

when i want to register user to and application I have a error and give me that user exist:
package main

import (
"github.com/FusionAuth/go-client/pkg/fusionauth"
"log"
"net/http"
"net/url"
)

func main() {
var HttpClient = &http.Client{}

u, _ := url.Parse("http://192.168.13.32:9011")
f := fusionauth.NewClient(HttpClient, u, "hBUKq3x_hUFXqA6GSXhdWWTRknTq7uzTNc_SzCmhpgDgm0UpNI-Wm56C")

r, e1, e2 := f.Register("e2337690-4c91-4573-bbed-88695701612f", fusionauth.RegistrationRequest{
	Registration: fusionauth.UserRegistration{
		ApplicationId: "dee6cf94-0bdc-4050-bca8-04ac1920ee9b",
		Username:      "dtd",
		Roles:         []string{"10"},
	},
})

log.Println("response", r)
log.Println("des err : ", e1)
log.Println("err", e2)

}

and my error is:

user.email: You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email]. user.password: You must specify the [user.password] property. user.username: You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email]. userId: A User with Id [e2337690-4c91-4573-bbed-88695701612f] already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions