> For the complete documentation index, see [llms.txt](https://docs-tron.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.tronify.io/stakepal-api/deng-lu.md).

# 登录

### 接口调用

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

**以下参数带\*字段为必填，不带\*号为选填**

#### Request Body

| Name                                                | Type   | Description |
| --------------------------------------------------- | ------ | ----------- |
| signature<mark style="color:red;">\*</mark>         | String | 钱包对登录文案的签名  |
| address<mark style="color:red;">\*</mark>           | String | 用户钱包地址      |
| connectWalletType<mark style="color:red;">\*</mark> | String | 钱包类型        |
| sourceFlag<mark style="color:red;">\*</mark>        | String | 来源标识        |

{% 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 %}

### 调用示例

{% 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 示例

<figure><img src="https://437826888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4K3XSHX743UkF46Owwyj%2Fuploads%2FLxiyA6b6lyvSe7hBKBUU%2Fimage.png?alt=media&amp;token=3592b715-346f-4b5c-97da-51bbad34908a" alt=""><figcaption></figcaption></figure>
