> For the complete documentation index, see [llms.txt](https://lumin-soft.gitbook.io/ekyc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lumin-soft.gitbook.io/ekyc/integration-guide/web-plugin/update-profile.md).

# Update Profile

## 1. **Create Session Token** :&#x20;

First Step When Customer Click On Update  You Have To Initialize Session First By Creating Session Token Using The Following API :

{% openapi src="/files/wupiJ86EBIpDAoKbqINZ" path="/api/v1/Auth/GenerateUpdateRequestSessionToken" method="post" %}
[enROLLCollection.json](https://3826285197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGM6tCcdsukNbOigN9U2m%2Fuploads%2FkUyWYX9DkD4UK6x9L9YL%2FenROLLCollection.json?alt=media\&token=71011f45-89fc-404f-9e8c-090198ef940c)
{% endopenapi %}

{% hint style="info" %}
UpdateSteps you Select Which Steps To Update Only These Steps Will Be Allowed To Update In This Session For This User. If You Wich To Allow All Leave This Array Empty&#x20;
{% endhint %}

<pre><code>// Available Steps are
        NationalID = 1,   
        Passport = 2,
        Phone = 3,
        Email = 4,
        Device = 5,      
<strong>        Location = 6,        
</strong>        SecurityQuestions = 7,
        Password = 8
</code></pre>

## 2.  **Import eNROLL JS File in index.html :**&#x20;

{% file src="/files/PMK9snJhr09kc5U634I9" %}

```html
<script src="eNROLL.min.js"></script>
```

## 3. Add Div Element With Specifying Id For This Div

```html
<div id="myDiv">
</div>
```

## 4. Initialize eNroll Component Any Where In Your JS File After      Document Is Loaded:

<pre class="language-javascript"><code class="lang-javascript">eNROLL.init({
   elementId:"myDiv", // The Id We Set Before For Our Div
   url:"{{environment.url}}", // this parameter is sent to you by email after acceptiong your org 
   sessionId://Token We Got In Step 1 From The API,
   mode:"reEnroll" | "update",
        //rEnroll : User Will Update All Profile 
        //update : User  Will Select What to Update     
   disableTutorials:true, //(optional)this value is to hide and skip tutorials, default value is false.
   mainColor: "#FF2255" // (optional) this value of main theme color of plugin will be send in url 
   secondaryColor:"#FF2255", // (optional) this value of secondry theme color of plugin will be send in url 
   headerColor:"#FF2255", // (optional) this value of header Background icon theme color of plugin  
   footerColor: "#FF2255",// (optional) this value of footer Background icon theme color of plugin 
   headerDisplay:"block | none",// (optional) this value to show or hide the header Background icon theme of plugin 
   footerDisplay:"block | none",// (optional) this value to show or hide the footer Background icon theme of plugin 
   onExit:()=>{
<strong>     // define What Happen When User Exit From eNROLL Plugin
</strong>  }
});
</code></pre>
