Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register a user to an application #78

Open
smilad opened this issue Oct 17, 2023 · 0 comments
Open

register a user to an application #78

smilad opened this issue Oct 17, 2023 · 0 comments

Comments

@smilad
Copy link

smilad commented Oct 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant