> For the complete documentation index, see [llms.txt](https://docs-tron.en.tronify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tron.en.tronify.io/stakepal-api/login.md).

# Login

### Endpoint usage

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/user/login`&#x20;

The fields with \* are required, and the fields without \* are optional

#### Request Body

| Name                                                | Type   | Description                           |
| --------------------------------------------------- | ------ | ------------------------------------- |
| signature<mark style="color:red;">\*</mark>         | String | Wallet signature of the login message |
| address<mark style="color:red;">\*</mark>           | String | User's wallet address                 |
| connectWalletType<mark style="color:red;">\*</mark> | String | Wallet type                           |
| sourceFlag<mark style="color:red;">\*</mark>        | String | Source identifier                     |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
  "resCode": 100,
  "resMsg": "Success",
  "data": {
    "token": "...",
    "user": {
      "id": 1,
      "fromAddress": "T...",
      "balance": "0",
      "platformAddress": "T...",
      "freezeBalance": "0",
      "userState": 0,
      "apiKey": "...",
      "sourceFlag": "***",
      "tgId": ""
    }
  }
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### code example

{% tabs %}
{% tab title="JavaScript" %}

```
// example
const params = {
    "connectWalletType": "TronLink",
    "address":"TKxxxxxxxxxxxxxxxxxxxxxxx",
    "signature": "xxxxxxxxxxxxxxxx",
    "sourceFlag": "tronify"
}
 const res = await axios.post('https://open.tronify.io/api/user/login',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman example

<figure><img src="https://3188465811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnv0Qbx2yTtH3TKQFd528%2Fuploads%2FAcmsU3mynVQsocm3UPmZ%2Fimage.png?alt=media&amp;token=976d3551-2116-4558-8d4c-1e7bfa7247d3" alt=""><figcaption></figcaption></figure>
