
---
## Get customer account information
---
This method gets a customer’s account information.
  
This method requires customer authentication.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Related To:**  
[ClientAccountInformation](/developers/mobile-sdk/class-reference/react-native/client#clientaccountinformation)
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public getAccount(onSuccess: (clientAccountInformation: ClientAccountInformation) =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1136">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1136-0" data-tab-group="tabgrp-1136" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1136-0" data-tab-group="tabgrp-1136" data-tab-active="true">

```JavaScript
Synerise.Client.getAccount(function(clientAccountInformation) {
    //success
}, function(error) {
    //failure
});
```

</div>
</div>


## 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** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 4.22.0 | 5.21.0 | 0.24.0 | 1.4.0 |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Related To:**  
[ClientAccountBasicInformationUpdateContext](/developers/mobile-sdk/class-reference/react-native/client#clientaccountupdatebasicinformationcontext)
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public updateAccountBasicInformation(context: ClientAccountBasicInformationUpdateContext, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **context** | [ClientAccountBasicInformationUpdateContext](/developers/mobile-sdk/class-reference/react-native/client#clientaccountupdatebasicinformationcontext) | yes | - | Object with customer’s first name, phone, and other optional data |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |
  
**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1137">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1137-0" data-tab-group="tabgrp-1137" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1137-0" data-tab-group="tabgrp-1137" data-tab-active="true">

```JavaScript
let context = new ClientAccountBasicInformationUpdateContext();
context.firstName = 'John';
context.lastName = 'Rise';
context.displayName = 'John Rise';
context.sex = ClientSex.Male;
context.phone = '123456789';
context.birthDate = '1989-08-03';
context.company = 'Synerise';
context.address = 'Marszałkowska';
context.city = 'Warszawa';
context.province = 'Mazowieckie';
context.zipCode = '00-000';
context.countryCode = '+48';
context.agreements = new ClientAgreements({
    email: true,
    sms: true,
    push: true,
    bluetooth: true,
    rfid: true,
    wifi: true
});
context.attributes = { ATTRIBUTE_1: 'ATTRIBUTE_1' }

Synerise.Client.updateAccountBasicInformation(context, function() {
  // success
}, function(error) {
  // failure
})
```

</div>
</div>


## 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.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Related To:**  
[ClientAccountUpdateContext](/developers/mobile-sdk/class-reference/react-native/client#clientaccountupdatecontext)
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public updateAccount(context: ClientAccountUpdateContext, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **context** | [ClientAccountUpdateContext](/developers/mobile-sdk/class-reference/react-native/client#clientaccountupdatecontext) | yes | - | Object with customer's email, password, and other optional data |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |
  
**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1138">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1138-0" data-tab-group="tabgrp-1138" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1138-0" data-tab-group="tabgrp-1138" data-tab-active="true">

```JavaScript
let context = new ClientAccountUpdateContext();
context.email = 'hello@synerise.com';
context.phone = '123456789';
context.customId = '000111';
context.firstName = 'John';
context.lastName = 'Rise';
context.displayName = 'John Rise';
context.sex = ClientSex.Male;
context.birthDate = '1989-08-03';
context.company = 'Synerise';
context.address = 'Marszałkowska';
context.city = 'Warszawa';
context.province = 'Mazowieckie';
context.zipCode = '00-000';
context.countryCode = '+48';
context.agreements = new ClientAgreements({
    email: true,
    sms: true,
    push: true,
    bluetooth: true,
    rfid: true,
    wifi: true
});
context.attributes = { ATTRIBUTE_1: 'ATTRIBUTE_1' }

Synerise.Client.updateAccount(context, function() {
  // success
}, function(error) {
  // failure
})
```

</div>
</div>


## Change customer's account password
---
This method changes a customer’s password.
  
This method requires customer authentication.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public changePassword(oldPassword: string, newPassword: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **newPassword** | string | yes | - | Customer's new password |
| **oldPassword** | string | yes | - | Customer's old password |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1139">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1139-0" data-tab-group="tabgrp-1139" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1139-0" data-tab-group="tabgrp-1139" data-tab-active="true">

```JavaScript
let newPassword = "NEW_PASSWORD";
let oldPassword = "OLD_PASSWORD";

Synerise.Client.changePassword(newPassword, oldPassword, function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## 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.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public requestPasswordReset(email: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **email** | string | yes | - | Customer's email |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |
  
**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1140">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1140-0" data-tab-group="tabgrp-1140" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1140-0" data-tab-group="tabgrp-1140" data-tab-active="true">

```JavaScript
Synerise.Client.requestPasswordReset("EMAIL", function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## 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.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public confirmPasswordReset(password: string, token: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **password** | string | yes | - | Customer's new password |
| **token** | string | yes | - | Customer's token provided in an email |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1141">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1141-0" data-tab-group="tabgrp-1141" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1141-0" data-tab-group="tabgrp-1141" data-tab-active="true">

```JavaScript
Synerise.Client.confirmPasswordReset("PASSWORD", "TOKEN", function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## 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.
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public requestEmailChange(email: string, password: string | null, externalToken: string | null, authID: string | null, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**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 |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1142">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1142-0" data-tab-group="tabgrp-1142" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1142-0" data-tab-group="tabgrp-1142" data-tab-active="true">

```JavaScript
Synerise.Client.requestEmailChange("EMAIL", "PASSWORD", function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## Confirm email change for customer account
---
This method confirms an email change.
  
This method is a global operation and doesn't require customer authentication.
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public confirmEmailChange(token: string, newsletterAgreement: Boolean, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **token** | string | yes | - | Customer's token provided in an email |
| **newsletterAgreement** | boolean | yes | - | Agreement for sending newsletters to the provided email |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1143">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1143-0" data-tab-group="tabgrp-1143" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1143-0" data-tab-group="tabgrp-1143" data-tab-active="true">

```JavaScript
Synerise.Client.confirmEmailChange("TOKEN", true, function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## 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.


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public requestPhoneUpdate(phone: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **phone** | string | yes | - | Customer's new phone number |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |
 
**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1144">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1144-0" data-tab-group="tabgrp-1144" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1144-0" data-tab-group="tabgrp-1144" data-tab-active="true">

```JavaScript
Synerise.Client.requestPhoneUpdate("PHONE", function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## 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.
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public confirmPhoneUpdate(phone: string, confirmationCode: string, smsAgreement: Boolean, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **phone** | string | yes | - | New phone number |
| **confirmationCode** | string | yes | - | A confirmation code received by a text message |
| **smsAgreement** | boolean | yes | - | Agreement for sending SMS to the provided number |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1145">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1145-0" data-tab-group="tabgrp-1145" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1145-0" data-tab-group="tabgrp-1145" data-tab-active="true">

```JavaScript
Synerise.Client.confirmPhoneUpdate("PHONE", "CONFIRMATION_CODE", true, function() {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


## Delete customer account by Identity Provider
---
This method deletes a customer's account.
  
This method requires customer authentication.
  

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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.

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Related To:**  
[ClientIdentityProvider](/developers/mobile-sdk/class-reference/react-native/client#clientidentityprovider)
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public deleteAccountByIdentityProvider(clientAuthFactor: string, clientIdentityProvider: ClientIdentityProvider, authID: string | null, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **clientAuthFactor** | string | yes | - | Token retrieved from provider |
| **clientIdentityProvider** | [ClientIdentityProvider](/developers/mobile-sdk/class-reference/react-native/client#clientidentityprovider) | yes | - | Provider of your token |
| **authID** | string | no | null | Optional identifier of authorization |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

## Deprecated methods

### Delete customer account
---
This method deletes a customer's account.
  
This method requires customer authentication.
  
| | **iOS SDK** | **Android SDK** | **React Native SDK** | **Flutter SDK** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.6.11 | 3.6.13 | 0.9.12 | n/a |
| <span style="color:orange">Deprecated in:</span> | 3.6.19 | 3.6.19 | 0.14.0 | n/a |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | n/a | n/a |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>



<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public deleteAccount(password: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **password** | string | yes | - | Customer's password |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1146">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1146-0" data-tab-group="tabgrp-1146" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1146-0" data-tab-group="tabgrp-1146" data-tab-active="true">

```JavaScript
let password = "PASSWORD";

Synerise.Client.deleteAccount(password, function(token) {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


### 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** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.6.11 | 3.6.13 | 0.9.12 | n/a |
| <span style="color:orange">Deprecated in:</span> | 3.6.19 | 3.6.19 | 0.14.0 | n/a |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | n/a | n/a |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public deleteAccountByOAuth(accessToken: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>


**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **accessToken** | string | yes | - | OAuth Access Token |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.

**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1147">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1147-0" data-tab-group="tabgrp-1147" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1147-0" data-tab-group="tabgrp-1147" data-tab-active="true">

```JavaScript
Synerise.Client.deleteAccountByOAuth(accessToken, function(token) {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>


### 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** |
| --- | --- | --- | --- | --- |
| <span style="color:green">Introduced in:</span> | 3.3.8 | 3.3.0 | 0.9.12 | n/a |
| <span style="color:orange">Deprecated in:</span> | 3.6.19 | 3.6.19 | 0.14.0 | n/a |
| <span style="color:red">Removed in:</span> | 5.0.0 | 6.0.0 | n/a | n/a |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

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

</div></div></div>

**Declared In:**  
lib/main/modules/ClientModule.js
  
**Class:**  
[ClientModule](/developers/mobile-sdk/class-reference/react-native/modules#client)
  
**Declaration:**  

<pre><code class="language-TypeScript">public deleteAccountByFacebook(facebookToken: string, onSuccess: () =&gt; void, onError: (error: Error) =&gt; void)</code></pre>

  
**Parameters:**  
| Parameter | Type | Mandatory | Default | Description |
| --- | --- | --- | --- | --- |
| **facebookToken** | string | yes | - | Facebook Access Token |
| **onSuccess** | Function | no | - | Function to be executed when the operation is completed successfully |
| **onError** | Function | no | - | Function to be executed when the operation is completed with an error |

**Return Value:**  
No value is returned.
  
**Example:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-1148">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1148-0" data-tab-group="tabgrp-1148" data-tab-active="true">JavaScript</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1148-0" data-tab-group="tabgrp-1148" data-tab-active="true">

```JavaScript
Synerise.Client.deleteAccountByFacebook(facebookToken, function(token) {
  // success
}, function(error) {
  // failure
});
```

</div>
</div>
