AuthN | Go SDK | Invite Endpoints
Invite Endpoints
Invite User
func (a *User) Invite(ctx context.Context, input UserInviteRequest) (*pangea.PangeaResponse[UserInviteResult], error)Send an invitation to a user.
input := authn.UserInviteRequest{
Inviter: "admin@email.com",
Email: "joe.user@email.com",
Callback: "https://www.myserver.com/callback",
State: "pcb_zurr3lkcwdp5keq73htsfpcii5k4zgm7",
}
resp, err := authncli.User.Invite(ctx, input)
Delete Invite
func (a *UserInvite) Delete(ctx context.Context, input UserInviteDeleteRequest) (*pangea.PangeaResponse[UserInviteDeleteResult], error)Delete a user invitation.
input := authn.UserInviteDeleteRequest{
ID: "pmc_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
}
resp, err := authncli.User.Invite.Delete(ctx, input)
List Invites
func (a *UserInvite) List(ctx context.Context, input UserInviteListRequest) (*pangea.PangeaResponse[UserInviteListResult], error)Look up active invites for the userpool.
input := authn.UserInviteListRequest{}
resp, err := authncli.User.Invite.List(ctx, input)
Type ItemOrder
type ItemOrder stringtype ItemOrder string
Type UserInviteDeleteRequest
type UserInviteDeleteRequest structtype UserInviteDeleteRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
ID string `json:"id"`
}
Type UserInviteListOrderBy
type UserInviteListOrderBy stringtype UserInviteListOrderBy string
Type UserInviteListRequest
type UserInviteListRequest structtype UserInviteListRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
// Should use FilterUserInviteList object here
Filter pangea.Filter `json:"filter,omitempty"`
Last string `json:"last,omitempty"`
Order ItemOrder `json:"order,omitempty"`
OrderBy UserInviteListOrderBy `json:"order_by,omitempty"`
Size int `json:"size,omitempty"`
}
Type UserInviteRequest
type UserInviteRequest structtype UserInviteRequest struct {
// Base request has ConfigID for multi-config projects
pangea.BaseRequest
Inviter string `json:"inviter"`
Email string `json:"email"`
Callback string `json:"callback"`
State string `json:"state"`
}