> 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/tron-api-seller/seller-auth.md).

# 卖家授权

### 接口调用

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/tronRent/sellerAuthCheck`

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

#### Headers

| Name                                      | Type | Description          |
| ----------------------------------------- | ---- | -------------------- |
| api-key<mark style="color:red;">\*</mark> |      | 访问tronify.io买家管理平台获取 |

#### Request Body

| Name                                          | Type   | Description              |
| --------------------------------------------- | ------ | ------------------------ |
| fromAddress<mark style="color:red;">\*</mark> | String | 用户地址（钱包地址）               |
| sourceFlag<mark style="color:red;">\*</mark>  | String | 渠道来源（需要双方约定一个名称来代表三方的渠道） |

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

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {
        "from_address": "TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k",
        "approve_address": "TGVEVDZZHJGZAHEPfou57u8F89i5nNNRxX",//授权地址
        "approve_id": 3, //授权id
        "approve_type": "1,2,3,4,5",
        "auto_sale": 1,
        "auto_vote": 1,
        "energy_price_customize": 1,//自定义出售能量最低价，默认0
        "energy_price_low": 60, //设置出售能量最低价，不设置默认60
        "bandwidth_price_customize": 0,
        "bandwidth_price_low": 0,
        "auto_withdraw": 1,
        "withdraw_left": 0,
        "auto_staking": 1,
        "stake_left": 0,
        "staking_trx": "178260 //质押trx数量
        "staking_available_trx": "5114.939104" //可租赁trx数量
    }
}
```

{% endtab %}
{% endtabs %}

### 调用示例

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

```javascript
// example
const params = {
    fromAddress: 'TKghVbeEzvrV8GLK3YE1gRrjVHSf8rGB6k',
    sourceFlag: 'tronLink'
}
const headers = {
  'api-key': 'your-api-key'
};
const res = await axios.post('https://open.tronify.io/api/tronRent/sellerAuthCheck',params, { headers })
console.log(res)
if(res.resCode === '100'){
   //... 
}
```

{% endtab %}
{% endtabs %}

### Postman 示例

<figure><img src="/files/QnFS5dAA0C5Tx8dnca6w" alt=""><figcaption></figcaption></figure>
