# Write User Database

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2Fs6ibH93TuOrDdNnJP9FZ%2Fimage.png?alt=media&#x26;token=85bc1118-7be2-4105-9bc1-4dc98f674acb" alt=""><figcaption></figcaption></figure>

## Input Type

* Firebase Database Url - See [firebase](https://pin-studios.gitbook.io/firebase-login-pro/getting-started/firebase "mention")
* Path
* Data Map
* Fetch Type

{% hint style="danger" %}
Recommended use Patch , if you use put or post will replace your database
{% endhint %}

## On Completed

{% content-ref url="../on-completed-delegate" %}
[on-completed-delegate](https://pin-studios.gitbook.io/firebase-login-pro/tutorial/on-completed-delegate)
{% endcontent-ref %}

## Example

### Step 1 - init datase api & id

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2FhNWsAz8fck3OpUGAVGO4%2Fimage.png?alt=media&#x26;token=c1c79b1d-6070-4237-8aeb-263cd3f152c2" alt=""><figcaption></figcaption></figure>

### Step 2 - Paste Firebase URL

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2FMLzbUDLDMLwB5rlhbM4b%2Fimage.png?alt=media&#x26;token=a3a46b20-8d31-46a9-a1d5-014ba958536d" alt=""><figcaption></figcaption></figure>

### Step 3 - write database

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2FXCJIP5sryB4oEJy7Jp9A%2Fimage.png?alt=media&#x26;token=9d281e37-93f3-48ac-bfba-33a18782f3ec" alt=""><figcaption></figcaption></figure>

```
//use append with /
user  
└── localId  
    └── data  
        └── email  
    
```

```
LogTemp: Database write response: {"Email":"test@gmail.com"}
LogTemp: Successfully written data to Firebase database.
```

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2FYkuX8ClGhXYibItv73Ai%2Fimage.png?alt=media&#x26;token=0d0c5aa3-2639-464e-953e-01ef1a750a8d" alt=""><figcaption></figcaption></figure>

## Extra

{% hint style="info" %}
If you want to use specify variable only , can use this
{% endhint %}

<figure><img src="https://1330293663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FACetefaIIBFAK55fRItk%2Fuploads%2F4Ao7PgyQC36mj4lpfnTb%2Fimage.png?alt=media&#x26;token=0b4dd0fb-232b-4029-9a14-5aaca5f34dc6" alt=""><figcaption></figcaption></figure>
