Skip to main content

ServicesApiClient

A class in Alta.Api.Client, Alta.Api.Client.HighLevel.

Online client for general services: public IP lookup, password resets, sign-up codes, verification and identity tokens. Reached as ApiAccess.ApiClient.ServicesClient; calls Alta's web API, which no longer answers.

Constructors​

1 private and internal constructor
MemberWhat it is
internal ServicesApiClient(IHighLevelApiClientManager clientManager)Creates a ServicesApiClient from clientManager.

Methods​

MemberWhat it is
async Task<JwtSecurityToken> GenerateIdentityTokenAsync(object userData)Asks the API for an identity token carrying the given user data.
async Task<IPAddress> GetPublicIpAddressAsync()Asks the API for this machine's public IP. Awaited while a local server starts, so a dead API delays startup.
async Task<bool> IsValidShortLivedIdentityTokenAsync(JwtSecurityToken token)Asks the API whether a short-lived identity token is valid. Used by the server's join check.
async Task RequestPasswordResetAsync(string email)Requests a password reset email.
async Task RequestSignUpCodeAsync(string firstName, string lastName, string email, string referral, string campaign)Requests a sign-up code for the given name and email.
async Task ResetPasswordAsync(int userId, string newPasswordHash, string resetToken)Sets a new password using a reset token.
async Task VerifyUserAsync(int userIdentifier, string verificationToken)Verifies a user with a verification token.