Skip to main content

AuthN | C# SDK | User Endpoints

User Endpoints

Get User (client token)

Client.Userinfo(string)

Retrieve the logged in user's token and information.

required parameters

string

Login code returned by the login callback

Response Object

Task<Response<ClientUserinfoResult>>

Response<ClientUserinfoResult>

var response = await client.Client.Userinfo("pmc_d6chl6qulpn3it34oerwm3cqwsjd6dxw");

Change a user's password

ClientPassword.Change(string, string, string)

Change a user's password given the current password.

required parameters

string

A user token value

string
string

Response Object

Task<Response<ClientPasswordChangeResult>>

Response<ClientPasswordChangeResult>

var response = await client.Client.Password.Change(
    "ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
    "hunter2",
    "My2n+Password");

Create User

User.Create(UserCreateRequest)

Create a user.

required parameters

UserCreateRequest

The identity of a user or a service

Response Object

Task<Response<UserCreateResult>>

Response<UserCreateResult>

Profile profile = new Profile();
profile.FirstName = "Joe";
profile.LastName = "User";

var request = new UserCreateRequest
    .Builder("joe.user@pangea.cloud", profile)
    .Build();

var response = await client.User.Create(request);

Delete User - Email

User.DeleteByEmail(string)

Delete a user by email address.

required parameters

string

An email address

Response Object

Task<Response<UserDeleteResult>>

An empty object.

await client.User.DeleteByEmail("joe.user@pangea.cloud");

Delete User - ID

User.DeleteByID(string)

Delete a user by ID.

required parameters

string

The identity of a user or a service

Response Object

Task<Response<UserDeleteResult>>

An empty object.

await client.User.DeleteByID("pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5");

Update user's settings

User.Update(UserUpdateRequest)

Update user's settings.

required parameters

UserUpdateRequest

Request parameters.

Response Object

Task<Response<UserUpdateResult>>

The updated user.

var request = new UserUpdateRequest
    .Builder()
    .WithEmail("joe.user@pangea.cloud")
    .WithDisabled(true)
    .Build();

var response = await client.User.Update(request);

List Users

User.List(UserListRequest)

Look up users by scopes.

required parameters

UserListRequest

Response Object

Task<Response<UserListResult>>

Response<UserListResult>

var request = new UserListRequest.Builder().Build();

var response = await client.User.List(request);

Delete user authenticator

UserAuthenticators.Delete(UserAuthenticatorsDeleteRequest)

Delete user authenticator.

required parameters

UserAuthenticatorsDeleteRequest

Request parameters.

Response Object

Task<Response<UserAuthenticatorsDeleteResult>>

An empty object.

var request = new UserAuthenticatorsDeleteRequest
    .Builder("pau_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a")
    .WithID("pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5")
    .Build();

await client.User.Authenticators.Delete(request);

Get user authenticators

UserAuthenticators.List(UserAuthenticatorsListRequest)

Get user authenticators.

required parameters

UserAuthenticatorsListRequest

Request parameters.

Response Object

Task<Response<UserAuthenticatorsListResult>>

User's authenticators.

var request = new UserAuthenticatorsListRequest
    .Builder()
    .WithID("pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5")
    .Build();

var response = await client.User.Authenticators.List(request);

Get user - email

UserProfile.GetByEmail(string)

Get user's information by email.

required parameters

string

An email address.

Response Object

Task<Response<UserProfileGetResult>>

User's profile.

var response = await client.User.Profile.GetByEmail("joe.user@pangea.cloud");

Get user - id

UserProfile.GetByID(string)

Get user's information by id.

required parameters

string

The identity of a user or a service.

Response Object

Task<Response<UserProfileGetResult>>

User's profile.

var response = await client.User.Profile.GetByID("pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5");

Update user

UserProfile.Update(UserProfileUpdateRequest)

Update user's information by identity or email.

required parameters

UserProfileUpdateRequest

Request parameters.

Response Object

Task<Response<UserProfileUpdateResult>>

Updated user profile.

Profile updatedProfile = new Profile()
{
    { "country", "Argentina" }
};

var request = new UserProfileUpdateRequest
    .Builder(updatedProfile)
    .WithID("pui_xpkhwpnz2cmegsws737xbsqnmnuwtbm5")
    .Build();

var response = await client.User.Profile.Update(request);