Customer account management

Get customer account information


This method gets a customer’s account information.

This method requires customer authentication.

The API key must have the API_PERSONAL_INFORMATION_CLIENT_READ permission from the Client group.

Declared In:
Headers/SNRClient.h

Related To:
ClientAccountInformation

Class:
Client

Declaration:

static func getAccount(success: ((ClientAccountInformation) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)getAccountWithSuccess:(nonnull void (^)(SNRClientAccountInformation *accountInformation))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
success ((ClientAccountInformation) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

Client.getAccount(success: { (clientAccountInformation) in
  // success
}) { (error) in
  // failure
}
[SNRClient getAccountWithSuccess:^(SNRClientAccountInformation *accountInformation) {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Get customer's events


This method retrieves events for an authenticated customer.

This method requires customer authentication. Declared In:
Headers/SNRClient.h

Related To:
ClientEventsApiQuery

Class:
Client

Declaration:

static func getEvents(apiQuery: ClientEventsApiQuery, success: (([ClientEventData]) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)getEventsWithApiQuery:(nonnull SNRClientEventsApiQuery *)apiQuery success:(nonnull void (^)(NSArray<SNRClientEventData *> *events))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
apiQuery ClientEventsApiQuery yes - Object responsible for storing all query parameters
success (([ClientEventData]) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Update customer account basic information


This method updates a customer’s account’s basic information (without identification data: uuid, customId, email).

This method requires the context object with the customer’s account information. Omitted fields are not modified.

This method does not require customer authentication and can be used by anonymous profiles.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 4.22.0 5.21.0 0.24.0 1.4.0

The API key must have the API_BASIC_INFORMATION_CLIENT_UPDATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Related To:
ClientUpdateAccountBasicInformationContext

Class:
Client

Declaration:

static func updateAccountBasicInformation(context: ClientUpdateAccountBasicInformationContext, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)updateAccountBasicInformation:(nonnull SNRClientUpdateAccountBasicInformationContext *)context success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
context ClientUpdateAccountBasicInformationContext yes - Object with customer's basic information optional data
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Update customer account information


This method updates a customer’s account information.

This method requires the context object with the customer’s account information. Omitted fields are not modified.

This method requires customer authentication.

The API key must have the API_PERSONAL_INFORMATION_CLIENT_UPDATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Related To:
ClientUpdateAccountContext

Class:
Client

Declaration:

static func updateAccount(context: ClientUpdateAccountContext, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)updateAccount:(nonnull SNRClientUpdateAccountContext *)context success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
context ClientUpdateAccountContext yes - Object with customer's email, password, and other optional data
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let agreements: ClientAgreements = ClientAgreements()
agreements.email = true
agreements.sms = true
agreements.push = true
agreements.bluetooth = true
agreements.rfid = true
agreements.wifi = true
let context: ClientUpdateAccountContext = ClientUpdateAccountContext()
context.email = "hello@synerise.com"
context.phone = "123-456-789"
context.customId = "CUSTOM_ID"
context.uuid = "UUID"
context.firstName = "FIRST_NAME"
context.lastName = "LAST_NAME"
context.displayName = "DISPLAY_NAME"
context.sex = .male
context.company = "Synerise"
context.address = "Lubostroń 1"
context.city = "Kraków"
context.province = "Małopolskie"
context.zipCode = "30-383"
context.countryCode = "+48"
context.birthDate = "01-01-2019"
context.avatarUrl = "http://www.synerise.com"
context.agreements = agreements
context.attributes = ["attribute1": "value1", "attribute2": "value2"]
context.tags = ["tag1", "tag2" "tag3"]
Client.updateAccount(context: context, success: {
  // success
}) { (error) in
  // failure
}
SNRClientAgreements *agreements = [SNRClientAgreements new];
agreements.email = true;
agreements.sms = true;
agreements.push = true;
agreements.bluetooth = true;
agreements.rfid = true;
agreements.wifi = true;
SNRClientUpdateAccountContext *context = [SNRClientUpdateAccountContext new];
context.email = @"hello@synerise.com"
context.phone = @"123-456-789";
context.customId = @"CUSTOM_ID"
context.firstName = @"FIRST_NAME";
context.lastName = @"LAST_NAME";
context.displayName = @"DISPLAY_NAME"
context.sex = SNRClientSexMale;
context.company = @"Synerise";
context.address = @"Lubostroń 1";
context.city = @"Kraków";
context.province = @"Małopolskie";
context.zipCode = @"30-383";
context.countryCode = @"+48";
context.birthDate = @"01-01-2019"
context.avatarUrl = @"http://www.synerise.com"
context.agreements = agreements;
context.attributes = @{@"attribute": @"value"};
context.tags = @[@"tag1", @"tag2" @"tag3"];
[SNRClient updateAccount:context success:^() {
  // success
} failure:^(NSError * _Nonnull error) {
  // failure
}];

Change customer's account password


This method changes a customer’s password.

This method requires customer authentication.

Returns the HTTP 403 status code if the provided old password is invalid.

The API key must have the SAUTH_CHANGE_PASSWORD_CLIENT_UPDATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func changePassword(password: String, oldPassword: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)changePassword:(nonnull NSString *)password oldPassword:(nonnull NSString *)oldPassword success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
password String yes - Customer's new password
oldPassword String yes - Customer's old password
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let newPassword: String = "NEW_PASSWORD"
let oldPassword: String = "OLD_PASSWORD"
Client.changePassword(password: newPassword, oldPassword: oldPassword, success: {
  // success
}, failure: { (error) in
  // failure
})
NSString *newPassword = @"NEW_PASSWORD";
NSString *oldPassword = @"OLD_PASSWORD";
[SNRClient changePassword:newPassword oldPassword:oldPassword success:^() {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Request password reset for customer account


This method requests a customer’s password reset with email. The customer will receive a token to the provided email address. That token is then used for the confirmation of password reset.

This method requires the customer’s email.

This method is a global operation and doesn't require customer authentication.

The API key must have the SAUTH_PASSWORD_RESET_CLIENT_CREATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Related To:
ClientPasswordResetRequestContext

Class:
Client

Declaration:

static func requestPasswordReset(context: ClientPasswordResetRequestContext, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)requestPasswordReset:(nonnull SNRClientPasswordResetRequestContext *)context success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
context ClientPasswordResetRequestContext yes - Object with the customer's email
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let email: String = "EMAIL"
let context: ClientPasswordResetRequestContext = ClientPasswordResetRequestContext(email: email)
Client.requestPasswordReset(context: context, success: {
  // success
}, failure: { (error) in
  // failure
})
NSString *email = @"EMAIL";
SNRClientPasswordResetRequestContext *context = [SNRClientPasswordResetRequestContext alloc] initWithEmail:email];
[SNRClient requestPasswordReset:context success:^() {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Confirm password reset for customer account


This method confirm a customer’s password reset with the new password and token provided by password reset request.

This method requires the customer’s new password and the confirmation token received by e-mail.

This method is a global operation and doesn't require customer authentication.

The API key must have the SAUTH_PASSWORD_RESET_CLIENT_CREATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Related To:
ClientPasswordResetConfirmationContext

Class:
Client

Declaration:

static func confirmResetPassword(context: ClientPasswordResetConfirmationContext, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)confirmResetPassword:(nonnull SNRClientPasswordResetConfirmationContext *)context success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
context ClientPasswordResetConfirmationContext yes - Object with customer's password and token
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let password: String = "PASSWORD"
let token: String = "TOKEN"
let context: ClientPasswordResetConfirmationContext = ClientPasswordResetConfirmationContext(password: password, token: token)
Client.confirmResetPassword(context: context, success: {
  // success
}, failure: { (error) in
  // failure
})
NSString *password = @"PASSWORD"
NSString *token = @"TOKEN"
SNRClientPasswordResetConfirmationContext *context = [[SNRClientPasswordResetConfirmationContext alloc] initWithPassword:password andToken:token];
[SNRClient confirmResetPassword:context success:^() {
  // success
} failure:^(NSError * _Nonnull error) {
  // failure
}];

Request email change for customer account


This method requests a customer's email change.

This method is a global operation and doesn't require customer authentication.

Returns the HTTP 403 status code if the provided token or the password is invalid.

The API key must have the SAUTH_CHANGE_EMAIL_CLIENT_UPDATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func requestEmailChange(email: String, password: String, externalToken: AnyObject?, authID: String?, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)requestEmailChange:(nonnull NSString *)email password:(NSString *)password externalToken:(id)externalToken authID:(NSString *)authID success:(nonnull void (^)(void))success failure:(nonnull void (^)(SNRApiError *error))failure

Parameters:

Parameter Type Mandatory Default Description
email String yes - Customer's new email
password String yes - Customer's password
externalToken AnyObject no - Customer's token (if OAuth, Facebook, and so on)
authID String no - Optional identifier of authorization
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Confirm email change for customer account


This method confirms an email change.

This method is a global operation and doesn't require customer authentication.

Returns the HTTP 403 status code if the provided token is invalid.

The API key must have the SAUTH_CHANGE_EMAIL_CLIENT_UPDATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func confirmEmailChange(token: String, newsletterAgreement: Bool, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)confirmEmailChange:(nonnull NSString *)token newsletterAgreement:(BOOL)newsletterAgreement success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
token String yes - Customer's token provided in an email
newsletterAgreement Bool yes - Agreement for sending newsletters to the provided email
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let token: String = "TOKEN"
Client.confirmEmailChange(token: token, success: {
  // success
}) { (error) in
  // failure
}
NSString *token = @"TOKEN";
[SNRClient confirmEmailChange:token newsletterAgreement:YES success:^() {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Request phone update on customer account


This method requests a customer's phone update. A confirmation code is sent to the phone number.

This method is a global operation and doesn't require customer authentication.

The API key must have the API_PERSONAL_PHONE_CLIENT_CREATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func requestPhoneUpdate(phone: String, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)requestPhoneUpdate:(nonnull NSString *)phone success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
phone String yes - Customer's new phone number
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let phone: String = "123-456-789"
Client.requestPhoneUpdate(phone: phone, success: {
  // success
}, failure: { (error) in
  // failure
})
NSString *phone = @"123-456-789";
[SNRClient requestPhoneUpdate:phone success:^() {
  // success
} failure:^(SNRApiError *error) {
  // failure 
}];

Confirm phone update on customer account


This method confirms a phone number update. This action requires the new phone number and confirmation code as parameters.

This method is a global operation and doesn't require customer authentication.

Returns the HTTP 403 status code if the provided UUID does not exist or the password is invalid.

The API key must have the API_PERSONAL_PHONE_CLIENT_CREATE permission from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func confirmPhoneUpdate(phone: String, confirmationCode: String, smsAgreement: Bool, success: (() -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)confirmPhoneUpdate:(nonnull NSString *)phone confirmationCode:(nonnull NSString *)confirmationCode smsAgreement:(BOOL)smsAgreement success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
phone String yes - New phone number
confirmationCode String yes - A confirmation code received by a text message
smsAgreement Bool yes - Agreement for sending SMS to the provided number
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Example:

let phone: String = "123-456-789"
let confirmationCode: String = "CONFIRMATION_CODE"
Client.confirmPhoneUpdate(phone: phone, confirmationCode: confirmationCode, smsAgreement: true, success: {
  // success
}) { (error) in
  // failure
}
NSString *phone = @"123-456-789";
NSString *confirmationCode = @"CONFIRMATION_CODE";
[SNRClient confirmPhoneUpdate:phone confirmationCode:confirmationCode smsAgreement:YES success:^() {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Delete customer account by Identity Provider


This method deletes a customer's account.

This method requires customer authentication.

HTTP 403 status code is returned if the provided password or token is invalid.

The API key must have the SAUTH_CLIENT_DELETE, SAUTH_OAUTH_CLIENT_DELETE, SAUTH_FACEBOOK_CLIENT_DELETE, SAUTH_APPLE_CLIENT_DELETE permissions from the Client group.

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func deleteAccount(clientAuthFactor: String, clientIdentityProvider: ClientIdentityProvider, authID: String, success: (() -> Void), failure: ((ApiError) -> Void))
+ (void)deleteAccount:(nonnull id)clientAuthFactor
clientIdentityProvider:(SNRClientIdentityProvider)clientIdentityProvider authID:(nullable NSString *)authID success:(nonnull void (^)(void))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
clientAuthFactor String yes - Customer's token from the identity provider
clientIdentityProvider ClientIdentityProvider yes - Customer's identity provider
authID String no - Optional identifier of authorization
success (() -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Since version 5.0.0, the success closure does NOT contain the isSuccess parameter.

Return Value:
No value is returned.

Removed methods

Request email change for customer account by Facebook {#request-email-change-for-customer-account-by-facebook}


This method requests a customer's email change by Facebook.

This method is a global operation and doesn't require customer authentication.

The API key must have the SAUTH_CHANGE_EMAIL_CLIENT_UPDATE permission from the Client group.

Replaced By:
Request email change for customer account

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func requestEmailChangeByFacebook(email: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)requestEmailChangeByFacebook:(nonnull NSString *)email success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
email String yes - Customer's new email
success ((Bool) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

let email: String = "EMAIL"
Client.requestEmailChange(email: email, success: { success in
  // success
}) { (error) in
  // failure
}
NSString *email = @"EMAIL";
[SNRClient requestEmailChangeByFacebook:email success:^(BOOL isSuccess) {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Delete customer account {#delete-customer-account}


This method deletes a customer's account.

This method requires customer authentication.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 3.6.11 3.6.13 0.9.12 n/a
Deprecated in: 3.6.19 3.6.19 0.14.0 n/a
Removed in: 5.0.0 6.0.0 n/a n/a

Returns the HTTP 403 status code is returned if the provided password is invalid.

The API key must have the SAUTH_CLIENT_DELETE permission from the Client group.

Replaced By:
Delete customer account by Identity Provider

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func deleteAccount(password: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void))
+ (void)deleteAccount:(nonnull NSString *)password success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
password String yes - Customer's password
success ((Bool) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

let password: String = "PASSWORD"
Client.deleteAccount(password: password, success: { (success) in
  // success
}) { (error) in
  // failure
}
NSString *password = "PASSWORD";
[SNRClient deleteAccount:password success:^(BOOL isSuccess) {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Delete customer account by OAuth {#delete-customer-account-by-oauth}


This method deletes a customer's account by OAuth.

This method requires customer authentication.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 3.6.11 3.6.13 0.9.12 n/a
Deprecated in: 3.6.19 3.6.19 0.14.0 n/a
Removed in: 5.0.0 6.0.0 n/a n/a

The API key must have the SAUTH_CLIENT_DELETE and SAUTH_OAUTH_CLIENT_DELETE permissions from the Client group.

Replaced By:
Delete customer account by Identity Provider

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func deleteAccountByOAuth(accessToken: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)deleteAccountByOAuth:(nonnull NSString *)accessToken success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
accessToken String yes - OAuth Access Token
success ((Bool) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Delete customer account by Facebook {#delete-customer-account-by-facebook}


This method deletes a customer's account by Facebook.

This method requires customer authentication.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 3.3.8 3.3.0 0.9.12 n/a
Deprecated in: 3.6.19 3.6.19 0.14.0 n/a
Removed in: 5.0.0 6.0.0 n/a n/a

The API key must have the SAUTH_CLIENT_DELETE and SAUTH_FACEBOOK_CLIENT_DELETE permissions from the Client group.

Replaced By:
Delete customer account by Identity Provider

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func deleteAccountByFacebook(facebookToken: String, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)deleteAccountByFacebook:(nonnull NSString *)facebookToken success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
facebookToken String yes - Token from an active Facebook session
success ((Bool) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

guard let facebookToken = FBSDKAccessToken.current()?.tokenString else {
    return
}
Client.deleteAccountByFacebookToken(facebookToken: facebookToken, success: { (success) in
  // success
}, failure: { (error) in
  // failure
})
NSString *facebookToken =  [FBSDKAccessToken currentAccessToken].tokenString;
[SNRClient deleteAccountByFacebook:facebookToken success:^(BOOL isSuccess) {
  // success
} failure:^(SNRApiError *error) {
  // failure
}];

Delete customer account by Apple Sign In {#delete-customer-account-by-apple-sign-in}


This method deletes a customer's account information by Sign In With Apple.

This method requires customer authentication.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 3.6.11 3.6.13 0.9.12 n/a
Deprecated in: 3.6.19 3.6.19 0.14.0 n/a
Removed in: 5.0.0 n/a n/a n/a

The API key must have the SAUTH_CLIENT_DELETE and SAUTH_APPLE_CLIENT_DELETE permissions from the Client group.

Replaced By:
Delete customer account by Identity Provider

Declared In:
Headers/SNRClient.h

Class:
Client

Declaration:

static func deleteAccountByAppleSignIn(identityToken: Data, success: ((Bool) -> Void), failure: ((ApiError) -> Void)) -> Void
+ (void)deleteAccountByAppleSignIn:(nonnull NSData *)identityToken success:(nonnull void (^)(BOOL isSuccess))success failure:(nonnull void (^)(NSError *error))failure

Parameters:

Parameter Type Mandatory Default Description
identityToken Data yes - Token from Sign In With Apple session
success ((Bool) -> Void) yes - Closure/Block to be executed when the operation is completed successfully
failure ((ApiError) -> Void) yes - Closure/Block to be executed when the operation is completed with an error

Return Value:
No value is returned.

Canonical URL: https://hub.synerise.com/developers/mobile-sdk/method-reference/ios/client-account