Account resource
Request a new refresh token
This function is only available to users with Sentry Interactive issued auth tokens.
- When used successfully, the cloud auth token and cloud refresh token from the response are added to the context manager and automatically stored in secure storage.
- This function can be used with the refresh token value from the context. To use the value from the context, you should pass null as the function parameter.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns a TokenResponse
val response = sdk.account().refreshToken("REFRESH_TOKEN")
// Returns a CompletableFuture<TokenResponse>
var response = sdk.account().refreshTokenAsync("REFRESH_TOKEN");
// Returns a TokenResponse asynchronously
let response = await sdk.account().refreshToken(refreshToken: "REFRESH_TOKEN")
// Returns a Promise<TokenResponse>
const response = await com.doordeck.multiplatform.sdk.api.account().refreshToken("REFRESH_TOKEN");
// Returns a Task<TokenResponse>
var response = await sdk.GetAccount().RefreshToken("REFRESH_TOKEN");
# Returns a Future[SimpleNamespace]
response = await sdk.account.refresh_token("REFRESH_TOKEN")
Logout
When used, the context manager restarts, and the values from the secure storage are automatically deleted.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns Unit
sdk.account().logout()
// Returns a CompletableFuture<Void>
sdk.account().logoutAsync();
// Returns Void asynchronously
await sdk.account().logout()
// Returns a Promise<any>
await com.doordeck.multiplatform.sdk.api.account().logout();
// Returns a Task<object>
await sdk.GetAccount().Logout();
# Returns a Future[SimpleNamespace]
await sdk.account.logout()
Register ephemeral key
To register a new ephemeral key, you will need to generate a new key pair.
- When used successfully, both the supplied private and public keys are added to the context manager and automatically stored in secure storage, along with the user ID and user certificate chain from the response.
- If your context manager already has public and private keys, you can pass null for those parameters, and those values will be retrieved from the context manager instead.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns a RegisterEphemeralKeyResponse
val response = sdk.account().registerEphemeralKey(KEY_PAIR)
// Returns a CompletableFuture<RegisterEphemeralKeyResponse>
var response = sdk.account().registerEphemeralKeyAsync(KEY_PAIR);
// Returns a RegisterEphemeralKeyResponse asynchronously
let response = await sdk.account().registerEphemeralKey(
publicKey: PUBLIC_KEY,
privateKey: PRIVATE_KEY
)
// Returns a Promise<RegisterEphemeralKeyResponse>
const response = await com.doordeck.multiplatform.sdk.api.account().registerEphemeralKey(
PUBLIC_KEY,
PRIVATE_KEY
);
// Returns a Task<RegisterEphemeralKeyResponse>
var response = await sdk.GetAccount().RegisterEphemeralKey(
publicKey: PUBLIC_KEY,
privateKey: PRIVATE_KEY
);
# Returns a Future[SimpleNamespace]
response = await sdk.account.register_ephemeral_key(
"BASE64_PUBLIC_KEY",
"BASE64_PRIVATE_KEY"
)
Register ephemeral key with secondary authentication
To register a new ephemeral key with secondary authentication, you will need to generate a new key pair. After the registration, you will need to verify the ephemeral key registration.
If your context manager already has public key, you can pass null for that parameter, and the value will be retrieved from the context manager instead.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns a RegisterEphemeralKeyWithSecondaryAuthenticationResponse
val response = sdk.account().registerEphemeralKeyWithSecondaryAuthentication(PUBLIC_KEY)
// Returns a CompletableFuture<RegisterEphemeralKeyWithSecondaryAuthenticationResponse>
var response = sdk.account().registerEphemeralKeyWithSecondaryAuthenticationAsync(PUBLIC_KEY);
// Returns a RegisterEphemeralKeyWithSecondaryAuthenticationResponse asynchronously
let response = await sdk.account().registerEphemeralKeyWithSecondaryAuthentication(
publicKey: PUBLIC_KEY,
method: nil
)
// Returns a Promise<RegisterEphemeralKeyWithSecondaryAuthenticationResponse>
const response = await com.doordeck.multiplatform.sdk.api.account().registerEphemeralKeyWithSecondaryAuthentication(PUBLIC_KEY);
// Returns a Task<RegisterEphemeralKeyWithSecondaryAuthenticationResponse>
var response = await sdk.GetAccount().RegisterEphemeralKeyWithSecondaryAuthentication(PUBLIC_KEY);
# Returns a Future[SimpleNamespace]
response = await sdk.account.register_ephemeral_key_with_secondary_authentication("BASE64_PUBLIC_KEY")
Verify ephemeral key registration
- When used successfully, both the supplied private and public keys are added to the context manager and automatically stored in secure storage, along with the user ID and user certificate chain from the response.
- If your context manager already has public and private keys, you can pass null for those parameters, and those values will be retrieved from the context manager instead.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns a RegisterEphemeralKeyResponse
val response = sdk.account().verifyEphemeralKeyRegistration(
code = "CODE",
keyPair = KEY_PAIR
)
// Returns a CompletableFuture<RegisterEphemeralKeyResponse>
var response = sdk.account().verifyEphemeralKeyRegistrationAsync("CODE", KEY_PAIR);
// Returns a RegisterEphemeralKeyResponse asynchronously
let response = await sdk.account().verifyEphemeralKeyRegistration(
code: "CODE",
publicKey: PUBLIC_KEY,
privateKey: PRIVATE_KEY
)
// Returns a Promise<RegisterEphemeralKeyResponse>
const response = await com.doordeck.multiplatform.sdk.api.account().verifyEphemeralKeyRegistration(
"CODE",
PUBLIC_KEY,
PRIVATE_KEY
);
// Returns a Task<RegisterEphemeralKeyResponse>
var response = await sdk.GetAccount().VerifyEphemeralKeyRegistration(
code: "CODE",
publicKey: PUBLIC_KEY,
privateKey: PRIVATE_KEY
);
# Returns a Future[SimpleNamespace]
response = await sdk.account.verify_ephemeral_key_registration(
"CODE",
"BASE64_PUBLIC_KEY",
"BASE64_PRIVATE_KEY"
)
Re-verify email
This function is only available to users with Sentry Interactive issued auth tokens.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns Unit
sdk.account().reverifyEmail()
// Returns a CompletableFuture<Void>
sdk.account().reverifyEmailAsync();
// Returns Void asynchronously
await sdk.account().reverifyEmail()
// Returns a Promise<any>
await com.doordeck.multiplatform.sdk.api.account().reverifyEmail();
// Returns a Task<object>
await sdk.GetAccount().ReverifyEmail();
# Returns a Future[SimpleNamespace]
await sdk.account.reverify_email()
Change password
This function is only available to users with Sentry Interactive issued auth tokens.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns Unit
sdk.account().changePassword(
oldPassword = "OLD_PASSWORD",
newPassword = "NEW_PASSWORD"
)
// Returns a CompletableFuture<Void>
sdk.account().changePasswordAsync("OLD_PASSWORD", "NEW_PASSWORD");
// Returns Void asynchronously
await sdk.account().changePassword(
oldPassword: "OLD_PASSWORD",
newPassword: "NEW_PASSWORD"
)
// Returns a Promise<any>
await com.doordeck.multiplatform.sdk.api.account().changePassword(
"OLD_PASSWORD",
"NEW_PASSWORD"
);
// Returns Task<object>
await sdk.GetAccount().ChangePassword(
oldPassword: "OLD_PASSWORD",
newPassword: "NEW_PASSWORD"
);
# Returns a Future[SimpleNamespace]
await sdk.account.change_password(
"OLD_PASSWORD",
"NEW_PASSWORD"
)
Get user details
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns a UserDetailsResponse
val response = sdk.account().getUserDetails()
// Returns a CompletableFuture<UserDetailsResponse>
var response = sdk.account().getUserDetailsAsync();
// Returns a UserDetailsResponse asynchronously
let response = await sdk.account().getUserDetails()
// Returns a Promise<UserDetailsResponse>
const response = await com.doordeck.multiplatform.sdk.api.account().getUserDetails();
// Returns a Task<UserDetailsResponse>
var response = await sdk.GetAccount().GetUserDetails();
# Returns a Future[SimpleNamespace]
response = await sdk.account.get_user_details()
Update user details
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns Unit
sdk.account().updateUserDetails("DISPLAY_NAME")
// Returns a CompletableFuture<Void>
sdk.account().updateUserDetailsAsync("DISPLAY_NAME");
// Returns Void asynchronously
await sdk.account().updateUserDetails(displayName: "DISPLAY_NAME")
// Returns a Promise<any>
await com.doordeck.multiplatform.sdk.api.account().updateUserDetails("DISPLAY_NAME");
// Returns a Task<object>
await sdk.GetAccount().UpdateUserDetails("DISPLAY_NAME");
# Returns a Future[SimpleNamespace]
await sdk.account.update_user_details("DISPLAY_NAME")
Delete account
This operation is executed instantly and is irreversible.
When used, the context manager restarts, and the values from the secure storage are automatically deleted.
- Kotlin
- Java
- Swift
- JavaScript
- C#
- Python
// Returns Unit
sdk.account().deleteAccount()
// Returns a CompletableFuture<Void>
sdk.account().deleteAccountAsync();
// Returns Void asynchronously
await sdk.account().deleteAccount()
// Returns a Promise<any>
await com.doordeck.multiplatform.sdk.api.account().deleteAccount();
// Returns a Task<object>
await sdk.GetAccount().DeleteAccount();
# Returns a Future[SimpleNamespace]
await sdk.account.delete_account()